godot icon indicating copy to clipboard operation
godot copied to clipboard

GPUParticles: Adds `use_physics_step` option to synchronize to physics simulation

Open JackErb opened this issue 1 year ago • 0 comments

Enabling this new option fixes GH-97160

When inheriting a high velocity from the particle emitter, we run into situations where the particles becomes desynced from the physics simulation, either traveling far ahead or lagging behind. To fix this I added an optional checkbox (default: false) to update the particle at the same rate as the physics simulation.

When this is enabled, the fixed_fps is ignored, and instead we update the particles the same number of times that the physics simulation was updated this frame. This keeps the particle's simulation in sync with the physics simulation.

With use_physics_step = true. Note that the particles are at the correct placement relative to the rocket barrel. image

With use_physics_step = false: image

JackErb avatar Dec 15 '24 22:12 JackErb