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

Particles emit by GPUParticles2D disappear when tree is paused #83258

Closed
tivec opened this issue Oct 13, 2023 · 6 comments · Fixed by #83488
Closed

Particles emit by GPUParticles2D disappear when tree is paused #83258

tivec opened this issue Oct 13, 2023 · 6 comments · Fixed by #83488

Comments

@tivec
Copy link

tivec commented Oct 13, 2023

Godot version

v4.2.beta1.official [b137180]

System information

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

Issue description

GPUParticles2D that have process mode set to PROCESS_MODE_PAUSABLE disappear when the tree is paused (using get_tree().paused = true). The entire particle system restarts when the tree is then unpaused (with get_tree().paused = false). as seen in this video.

Godot_v4.2-beta1_win64_emFP32bwDg.mp4

Expected result is for the particles to stop moving and resume their velocity when the system is unpaused.

Steps to reproduce

  • Open the attached reproduction project
  • Open test_scene.tscn and run the scene.
  • Observe how both particle systems are playing properly
  • Press space bar to pause the game and observe that the particles of the left particle system disappear.
  • Press space bar again to unpause, and observe how the left particle system restarts emission.

Minimal reproduction project

GPUParticlesTest.zip

@akien-mga
Copy link
Member

I can confirm the bug in 4.2-beta1, and it seems to work fine in 4.2-dev6, so it's very likely a regression from #79527. CC @QbieShay

@QbieShay
Copy link
Contributor

Could you add a video of the expected behaviour?

@tivec
Copy link
Author

tivec commented Oct 13, 2023

Godot_v4.1.2-stable_win64_A5xb6QkvPY.mp4

In this video I pause the game on a 4.1.2 build, where it shows the expected behaviour of the particles stopping where they are when the game is paused, and resuming when the game is unpaused.

Also, if you open the attached test project, you can also see and test the expected behaviour on 4.1.

@QbieShay
Copy link
Contributor

Thank you! Having a video is just simpler for me to know the target ^^ thanks for your patience. I'll need to investigate a little because I do not think i touched specifically in the way particles are emitted, so i'll need to first do a bisect and make sure I introduced that bug with the big PR (which is likely, but not sure)

@tivec
Copy link
Author

tivec commented Oct 13, 2023

Thank you! Having a video is just simpler for me to know the target ^^ thanks for your patience. I'll need to investigate a little because I do not think i touched specifically in the way particles are emitted, so i'll need to first do a bisect and make sure I introduced that bug with the big PR (which is likely, but not sure)

Absolutely no problem, I know how hard it can be to understand how a random user sees how something should function, having the video should help you see the intended results the best way :)

@QbieShay QbieShay self-assigned this Oct 17, 2023
@QbieShay
Copy link
Contributor

Confirmed it's introduced by my PR. Now, why, it's something i'll try to figure out asap :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment