Hi, I’m trying to rotate a particle checking the move of the caracter. If the character goes to right, the particle should rotate to left, and viceversa. What I’m trying to do, is to simulate the motion of the flame on a candle.
I made some tests to rotate and I found this problem, the rotation is not smooth. Maybe exist another way to solve this. The Material is Particles/Additive. I did a simple test, the other candle was made with a Texture Sheet Animation, but for testing purposes I did this the more simple I could… to be practical I made a pingpong to show what is happening. I’m using Unity 2017.3.0f3
You’re modifying the start rotation. The start rotation is only used when a particle is initially spawned, and your particles have a lifetime of 2 seconds. That means roughly every two seconds when a new particle is spawned it’ll use the value from the start rotation. The rest of the time it’s ignored.
If you’re looking to rotate a live particle you can either modify the rotation using GetParticles() & SetParticles(), or you can change the particle rate and lifetime so that the particle doesn’t last as long. The first option will give you much better control though is a little more expensive. Unfortunately the way Unity’s current particle system works if you set the max particle count to 1, lifetime to 0.05, and set a rate of 1000 it still doesn’t guarantee that there will be a particle visible every frame.
You can also use the ExternalForces module and a wind zone to simulate the effect. Adjust the windzone with your script. Its particularly useful when you have multiple particles such as fire or smoke.
This case is a single quad with no actual motion, just rotation which external forces wouldn’t be useful for. External forces would be great for handling something like a little smoke coming from the candle.
Unless you have serious concern of performance (in which case Particle System is usually falsely blamed), for a dynamic candle flame it is better to not to use a single texture but stack few glow particles emitted upward from the base, use color and size over lifetime modules to fade out the flame at the top end. Also change the simulation space to World.
I’m using this because It’s only one particle, one emission, and profiler doesn’t show any impact on performance.
Thank you people for the help! Now I have everything clear.