Case 1283120) Particle System "Rate Over Distance" doesn't work when moved in LateUpdate

I don’t know if this is by design, when I move a particle system that uses “Rate Over Distance” emission during the LateUpdate phase, it won’t emit particles.

In order for the emission to work, the particle system needs to be moved during Update instead.

I’m using Unity 2018.4.27f1 and my test project is attached to this post. In the test project select “GameObject” in the Hierarchy and toggle the “Use LateUpdate” option.

Is this worth a bug-report?

6388329–712038–UnityParticlesRateOverDistance.zip (23.7 KB)

Hi,
This is due to how we calculate the velocity of the particle system.

6388422--712044--Untitled picture.png
PS.Update2 captures the old position.
Ps.Update1 takes the current position and compares against the old
So only movement that is between these 2 updates will be detected.

We cant change how the velocity is calculated as its incredibly fragile code however we have added a new feature in 2021.1 that lets you set a custom velocity to the ParticleSystem, this lets you control the velocity and avoid these issues.

1 Like

I see, that makes sense. Thank you for the rapid help, @karl_jones !

1 Like

Hey.
Apologies, I just realized this is a bug!
This stuff I was referring to is for some other use cases that often popup however LateUpdate should work. I actually fixed this bug recently! Unity Issue Tracker - [Shuriken] Particles with Rate Over Distance does not emit when moving them in LateUpdate() method

The backport went into 2018.4.27f1 so its very strange that its not working for you. Could you file a bug report :slight_smile:

1 Like

Thank you for giving it a second thought!

Here is the bug-report:
(Case 1283120) 2018.4: Particle System “Rate Over Distance” doesn’t work when moved in LateUpdate

2 Likes

Hey Peter,

Looks like this issue has been fixed but there was a mistake on the backporting info.
The fix has landed in 2018.4.29f1, I just verified it myself against your bug.

2 Likes

Thank you!

1 Like