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

Fix CPUParticles emission updating using physics interpolation #60347

Merged

Conversation

lawnjelly
Copy link
Member

When switching emission on and off, processing was always being switched on and off using internal_process, which was incorrect for using physics interpolation (where physics_process is the relevant one).

This PR correctly updates the process mode according to whether physics interpolation is being used.

Fixes bug mentioned by @mackatap in #52846 .

Notes

  • This is something I missed due to just testing with continuous emission. The on / off emission mechanisms were historically only doing this with internal_process, but they have to do this with internal_physics_process when interpolation is enabled.
  • Also sets the initial processing state to on or off depending on the emission flag, rather than always setting processing to on at start, which is probably more correct for starting a CPUParticles in a non-emitting state.

When switching emission on and off, processing was always being switched on and off using internal_process, which was incorrect for using physics interpolation (where physics_process is the relevant one).

This PR correctly updates the process mode according to whether physics interpolation is being used.
@lawnjelly lawnjelly requested a review from a team as a code owner April 18, 2022 14:36
@lawnjelly lawnjelly added this to the 3.5 milestone Apr 18, 2022
@akien-mga akien-mga merged commit 4fc1a57 into godotengine:3.x Apr 25, 2022
@akien-mga
Copy link
Member

Thanks!

@lawnjelly lawnjelly deleted the interpolation_cpuparticles_process branch April 26, 2022 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants