Control direction of Instantiated particles.

I have a particle ‘watersplash’ being created at the point of collision between a randomly spawned falling gameObject and a water surface. The particle prefab spawns in the right location, but I can’t think of how to get the particles to ‘splash’ in either of 2 possible directions:

1- particles shoot straight up (which I thought might work with (Vector3.up), but not so much.)

2- or in the opposite direction of the falling gameObject that collides with the trigger. (wasn’t sure how to do this)

Here is the existing code:

    function OnTriggerEnter(other : Collider){
       if(other.gameObject.CompareTag("splash")){
          splashPoint=other.transform.position;
          splashPoint.y = waterHeight;
          Instantiate(splashPrefab,splashPoint,other.transform.localRotation);
       }
    }

Would appreciate any input you may have.
Brendan G.

When I wanted to control the direction of some particles in my game, I used a mesh as the emitter type. The particles are emitted from each polygon of the mesh, so you could create one to emit the particles in the directions you require.

You change the settings in the particle emitter to make it go the direction you need.

Use local space settings so they obey your commands to rotate.

Thanks guys,

The particle emission was working great as the ‘fish’ objects hit the surface of the water, it was just that the particles were shooting out in the direction that the fish we heading, which looks weird. I will checkout each of your solutions.

Best to all, and have a great day!

B.