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.
I have the same problem in my case I'm moving object with Rigidbody MovePosition, and turning it with Rigidbody MoveRotation. My object has particle system with rate over distance emmision (simulation space: world). And only strangly only MoveRotation couses particles emmision and MovePosition doesn't, so they are appearing only when turning. Using Unity 5.50f3
Answer by Jodwig
Dec 31, 2016 at 03:24 PM
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: https://issuetracker.unity3d.com/issues/particles-emission-over-distance-not-working-when-moving-parent-with-not-non-kinematic-rigidbody-slash-rigidbody2d
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."
Hope it helps someone.
Answer by CLaferriere
Jan 09 at 11:37 AM
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.
Answer by Meganion
Apr 18 at 04:13 PM
Hey,i've made an workaround at: https://forum.unity3d.com/threads/particle-system-distance-rate-rigidbody-2d.445785/
Basically you do have to add another gameobject with rigidbody knematic not simulated and put the particle system inside that, it will work perfectly
I actually figured it out a while ago, but you had a different solution then I did, I'll post my solution later if you're interested.
Sure, it would be quite good! :D
Answer by Meganion
Apr 19 at 06:25 PM
Hey @Jodwig, i've found the answer for this problem, i've posted the solution on the link below https://forum.unity3d.com/threads/particle-system-distance-rate-rigidbody-2d.445785/
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
7 People are following this question.
Shuriken particle are clipped by Skinned Mesh Renderers?
Character's Feet Rotated Weirdly
Unity null check
How to Get Procedural Materials to work on Unity Tree Creator
Input.GetKey not working with W and S