After upgrading my project from Unity 5.4.x to Unity 5.5.0 most of my particle systems stopped working. I checked it, and found out that all Particle Systems that used Rate over Distance in Emission Module stopped working. In editor when I move the Particle System manually on the scene it works just fine, but not when I play. So then I started checking everything carefully and found out the culprit. I used “transform.position” to move my projectiles etc. and this function no longer affects Rate over Distance. When I changed the script to Rigidbody and AddForce function it suddenly started working.
No idea if this is intended by them or simply a bug, but I didn’t find anything online regarding this change in 5.5.0. It always worked, and I don’t feel like changing all my code and fighting with AddForce to achieve similar values as in transform.position.
Does anyone else noticed this? I submitted it as a bug, but it might take weeks for them to answer it.
So, it’s a problem with Rigidbody. When your object has non-Kinematic Rigidbody attached to it, it will screw your Rate over Distance if you are trying to move it with transform.position. It’s not a bug, but a Unity change in 5.5.0:
And as I said, I contacted Unity Support and that’s what they said:
"When a RigiBody is attached to a ParticleSystem we now use the velocity from the Rigidbody instead of calculating it.
The reason for this is that the Rigidbody and the particle system would have different velocity values which would cause particle to behave incorrectly, particularly at large velocities.
We now allow the Rigibody to control the velocity when attached (and kinematic). By dragging a particle system in the scene the Rigidbody will not update its velocity, however child systems calculate a local velocity using positional difference and then apply this to the Rigibody velocity which is why it still works with children providing they do not have a Rigibody attached.
If you wish to drag the object in the scene then you would need to either remove the Rigidbody or write a script to update the Rigibody velocity value to match the dragging action.
There is a small icon to indicate that a Rigidbody is being used in the Inherit Velocity module, we will move this to the main module so it is more obvious."
I’m having a problem where my character has a particle effect behind them, and moves with velocity. However the character can dash forward where I use addforce to push them. The particle effect with rateOverDistance works fine for movement, but as soon as you dash with the player and addforce takes over, the particles don’t emit. It works only when the player is holding down the movement joystick while dashing which leads me to believe it rateOverDistance needs just a velocity and not addForce.
i have had this same problem in 2021 (using unity 2019) and i read this thread and the one linked by user meganion.
i found the described behavior logical but the solution(s) confusing.
what i did was this:
as a “bullet” i am having a particle effect with “emission: rate over distance” with non-kinematic rigidbody (parent). it worked well even though it has the above described situation.
i added a “homing” effect, by putting a Rigidbody.AddForce() in (Fixed)Update() which required me to set Rigidbody.Velocity() to zero or else my homing wouldnt work.
with this change the particle effect was lost (not emitting anything)
so as a summary: having the rigidbody was no problem. starting it with AddForce() was no problem. but adding homing effect with AddForce() in each FixedUpdate() AND setting velocity manually to zero (which is maybe stupid, i dont know, it just worked for me) caused the velocity to stay zero. setting the velocity manually worked, but only when i multiplied it by Time.fixedDeltaTime (because its a physics effect).
hope this helps someone else
feel free to tell me where my whole logic is stupid, i would love to learn to do it better