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.