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

CPUParticles initialize data on set_amount #66115

Merged
merged 1 commit into from
Sep 20, 2022

Conversation

lawnjelly
Copy link
Member

Fills particle data with zeroes on resize using set_amount(), to prevent garbage data including Nans being sent to VisualServer, which can corrupt the spatial partitioning.

Fixes #65841

Notes

  • Interesting this had never been spotted before.
  • I checked and it existed in 3.4, before any changes due to physics interpolation (indeed the same bug exists in 2D which has no interpolation).
  • The bug occurs because set_bulk_array can be called for the multimesh before the particle data is properly filled.

Fills particle data with zeroes on resize using set_amount(), to prevent garbage data including Nans being sent to VisualServer, which can corrupt the spatial partitioning.
@lawnjelly lawnjelly requested review from a team as code owners September 19, 2022 15:59
@lawnjelly lawnjelly added bug topic:rendering topic:2d topic:3d cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release labels Sep 19, 2022
@lawnjelly lawnjelly added this to the 3.6 milestone Sep 19, 2022
@akien-mga akien-mga merged commit 89e9c3d into godotengine:3.x Sep 20, 2022
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 3.5.1.

@akien-mga akien-mga removed the cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release label Sep 20, 2022
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