Search Issue Tracker

Won't Fix

Votes

1

Found in

2018.4.0f1

2019.1.0a1

2019.1.7f1

2019.2.0a1

2019.3.0a1

Issue ID

1174498

Regression

No

Particle System that uses Force Field behaves inconsistently when frame rate is increased

Visual Effects - Legacy

-

Repro steps:
1. Open the attached project
2. Select "GameObject" in the Hierarchy and change the "Framerate Cap" parameter to 60 in the "For Testing (Script)" component
3. Expand "Wind" and then "Wind Particle 1" objects in the Hierarchy, select their child object "GameObject" and enter Play mode
4. In the Scene window, find the Play button in the Particle Effect panel
5. Press Play multiple times and observe particle behavior

Expected result: particle paths look the same on every run
Actual result: particle paths are significantly different

Reproducible with: 2018.4.6f1, 2019.1.14f1, 2019.2.1f1, 2019.3.0a11
Could not test with: 2017.4.31f1 (Particle System Force Field is not in the API)

Note1: Using 30 FPS, particle paths are consistent between tries.

Note2: Using 60 FPS, Particle System interacts differently with the Particle System Force Field and inconsistencies are lesser in 2019.1.0b7 and below

  1. Resolution Note (2020.1.X):

    I sympathise with this bug report because I agree it makes it annoying when trying to get a 100% deterministic effect, but unfortunately it's not 100% fixable.

    It's the varying Time.deltaTime between frames that causes the effect to behave differently (and it can happen regardless of app framerate).

    By default, we must update the system each frame with whatever time has passed, otherwise a system may pause for a frame if we waited until a fixed time interval had elapsed. This means that the unpredictable Time.deltaTime affects the exact moment that particles enter and leave the force field volume.

    There is a workaround, which is to simulate this effect in script using ParticleSystem.Simulate with your own desired timestep (i.e. in FixedUpdate() with the physics timestep.) However, no visual interpolation of particles is performed when doing this, which will mean the effect will appear to stutter as its particles move, rather than appear smooth. It is this stuttering that means we can't offer an option for this behaviour by default.

    It now behaves more consistently in Unity 2020.1.0a4 and above.

Add comment

Log in to post comment