- Home /
How do I use gravity on particles?
Hello,
I already know how to add gravity to the particles on the y-axis but I wanna apply this to both axis using the 2D physics gravity. Basically I'm trying to make the accelerometer affect the particles. I already made an accelerometer script that changes the 2D gravity for the game and it works on rigid bodies. Is there a script that would allow gravity to the x axis on particles or something like that?
If anyone could help ill appreciate it.
Answer by Pangamini · Sep 09, 2017 at 03:39 PM
ParticleSystems have Force Over Lifetime module you can use. For more detailed control, you can modify particle velocity using GetParticles and SetParticles.
This worked all I had to do was modify my script to apply the forces to the force over lifetime and now particles are effected by this. Thank you!
Answer by amitDklein · Aug 24, 2021 at 01:15 PM
Unity 5.0: there's a Gravity Modifier input that lets you determine the effect of world gravity on the particles
Just change it to 1 and you will have gravity
Your answer
Follow this Question
Related Questions
When particles collide with the floor, dont want them to move 1 Answer
Create Twisters that Move and sucks the player up 1 Answer
Adjusting unity particle / cubes properties 0 Answers
How to lower thee effect of Gravity on Particles?/Shorter Trail when moving. 0 Answers
How to create a ParticleSystem whose particles orbit it independently? 1 Answer