How to make a water sprinkler with unity's Visual Scripting


Hello, I'm Dylon and welcome back. This time I will explain how to create a sprinkler VFX using Unity's visual scripting.

We will start with the spawn type of the VFX. for the water we want a constant spawn rate. we will set this to 500.

Next, we will do the Initialize particle. set the capacity to 500 because we want all of our particles to come out before resetting. To explain the image below we want to create the arc shape it will follow. do this by making a set position shape arc torus node. Then add velocity from direction and speed in a random direction as well as tangent nodes. these will make sure it follows in line with the arc and look more realistic of how water flies through the air.  We also want to set our lifetime. this can be whatever you desire. I would recommend placing the VFX in scene where it will go off and matching the distance in real time. 


Next, we will tackle the Update portion which is what happens as the particles fly through the air before their lifetime ends. For our game the water VFX has collisions around the bird bath within the graph so that they bounce off in game. you can use these AABoxs for whatever meets your game's needs.  The main thing is the gravity and the linear drag nodes. This is going to be what effects your particles such as bringing them down and keeping them on a path.

 

Finally, we come to the output part which is where things like color and size is handled. We can also choose how to Oriente the particles. for the water we want it to orient along its individual velocity. we also set our size and the color and alpha over life so that the rain drops fade away as if they are melting into the ground.

At the end it should look like this. Now you can take this as a base and apply it to many different things other than water. I hope you enjoy the game.

Get Not so Trash Panda

Leave a comment

Log in with itch.io to leave a comment.