Particle System Inherit Velocity Changes: Your feedback needed!

Hey!

A bit of background
We are currently investigating a long standing issue regarding the particle system and physics.
When a particle system is driven by a rigidbody and is using inherit velocity the particles will behave erratically when the system is moving at high speeds.

This is because we calculate the particle systems velocity each frame by using the old position, new position and time dt:
Velocity = (position - oldPosition) / dt;

The rigid body does not update every frame(it uses fixed time) so our velocity calculation can be off from the actual velocity used by the rigid body.

Currently we suggest users enable interpolation when using RigidBody’s to fix this issue and it does work in the majority of cases however if you are setting the velocity directly to the rigidbody then the velocity calculations can become incorrect.

For example.
If a system is moving along the x axis and a script changes the velocity to now be along the y axis then we get a frame where our velocity is calculated incorrectly causing a particle to fly off in the wrong direction.

2680125--189337--example.gif

The fix
We now have a fix which does the following:
Velocity = rigidbody velocity + local velocity.

Local velocity is calculated from the coordinates with respect to the rigidbody. So for example if you had a child particle system moving under a rigid body parent then you would want the velocity of the rigid body plus the velocity of the local movement.

The question
So now you have some background :smile:
We want to make it default behaviour to grab the rigidbody velocity and do the above calculations if a rigidbody is present. We discussed internally having an option to enable/disable this behaviour but could not see any reason you would not want it enabled. We don’t want to add unnecessary API/editor features.

So can you see any reason why you would not want this enabled by default?

Edit:
This fix has now gone into 5.5. If you have any issues regarding this please file a bug report and post the number here.

1 Like

Here in 2022 trying to figure out why “Inherit Velocity” doesn’t work. The ParticleSystem component is on a GameObject that doesn’t have a RigidBody, and is moved around via scripts. It behaves so erratically that I’m not sure I could even describe what I think is happening. It seems like SOME but not all of the particles are at least inheriting the direction but not magnitude of the parent transform’s velocity. Ie, some of the particles shoot foward faster than the object when it starts moving forward.

1 Like

I always experienced this issue with the Inherit Velocity module since I recall working with particles, in fact I never use it. Most of the particles will correctly inherit it, but a bunch of them will just shoot away very fast in a random direction. How is this not fixed yet? Is there even a workaround we can use?

1 Like

2025 and I’m still experiencing this issue

For me it happens when my physics driven character controller makes sudden stops and starts in opposite directions on the Y-axis. The next immediate particle spawned from Emit will suddenly veer off course and subsequent particles will behave as expected.

Setting Inherit Velocity to Current instead of Inherit “fixes” it, but it’s not the desired behavior I want. Guess I’ll try experimenting with curves or some scripting.

Is the official fix on by default or do we have to enable it somehow?

I think in the year of 2025, VFX Graph is probably the suggested solution. I don’t imagine they’re doing any work on the old Particle System any more. I’ve found it substantially more capable than the old Particle System component.

I’ve heard that more than a few times. Guess I gotta get a new education