|
Hello. I have just recently started my internship for a small indy developer in Norway, and have been given the task of creating a prototype level for a future project. My experience is visual level design, and close to no scripting what so ever. I'm a major noob with scripting. I need to figure out how to activate a particle effect with a contact/collision trigger. To be more precise, activate a water splash after hitting the water with the character. Anyone who can give me a hint on how to set up the script? Preferably in C#, but JS could also work since it's only a prototype project. -Noob intern-
(comments are locked)
|
|
what you can do is place a trigger collider on the water (mesh of box) and instantiate a splash prefab (one shot particle emitter) at the point of contact. Also if the water is perfectly level like in a small lake you can set the exact height of the water, otherwise you'll need to use a raycast to fine the surface point e.g.
You can also do a 2nd splash which is smaller and use it with OnTriggerStay so it plays while the player stands in the water as well. This helped me too! But when the player leaves the water, the splash effect continues to appear...
Jan 04 at 07:00 PM
smirlianos
(comments are locked)
|
