Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPUParticles2D trails continue simulating when tree is paused #85213

Open
tivec opened this issue Nov 22, 2023 · 3 comments · May be fixed by #89991 or #95912
Open

GPUParticles2D trails continue simulating when tree is paused #85213

tivec opened this issue Nov 22, 2023 · 3 comments · May be fixed by #89991 or #95912

Comments

@tivec
Copy link

tivec commented Nov 22, 2023

Godot version

v4.2.rc1.official [ad72de5]

System information

Godot v4.2.rc1 - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1660 Ti (NVIDIA; 31.0.15.3699) - AMD Ryzen 7 4800H with Radeon Graphics (16 Threads)

Issue description

Particle trails continue simulating and cause weird artifacts when the game is paused. I have tested this on 4.2 Beta 6, RC1, but also on 4.1.3 stable.

godot_z8cBnfh0uH.mp4

The above video is from the MRP included below.

Steps to reproduce

  • Load the included MRP project
  • Start the game (main.tscn)
  • Let the particles simulate for a little to see how they're supposed to be behaving.
  • Press SPACE to pause the game. Wait 5-10 seconds
  • Watch particles behave weirdly.
  • Press SPACE to unpause the game to see even more chaos before the particle system returns to normal.

Minimal reproduction project

ParticleTrailPaused.zip

@tivec
Copy link
Author

tivec commented Nov 22, 2023

@tivec
Copy link
Author

tivec commented Nov 23, 2023

Further testing on this has shown that it does not only happen on particles with trails, but it might be related to turbulence. I have attached a new MRP that also shows a third particle system that has trails, but has turbulence turned off.

ParticleTrailPaused.zip

So two things I can take away from this:

  • Some particle simulation continues to happen when the tree is paused, if turbulence is on. This is probably unintended.
  • Trails should probably stop simulating when the tree pauses.

tomas-g03 added a commit to tomas-g03/godot that referenced this issue Mar 25, 2024
When using particles with trails or turbulence, some simulation would continue
to happen when the scene tree was paused, because neither feature was taking
the particle system's speed scale into account.

With this commit, trails are frozen at the latest frame when the speed scale is
zero, while changes in velocity resulting from turbulence are multiplied by
delta time so that they adjust for speed scale and fixed FPS. The default
values of speed 1.0 and 30 FPS were used as reference for correct behavior.

Fixes godotengine#85213.
@etodd etodd linked a pull request Aug 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
2 participants