Skip to content

Conversation

@ramirezmike
Copy link
Contributor

Objective

Solution

This solution to the problem just uses the non-panicking versions of retrieving an entity from the world and inserting a component in the on_remove_no_auto_mass_property function that runs when the component is removed.

I think an argument could be made that this silently hides an issue of code trying to operate on an entity that no longer exists or that the on_remove shouldn't fire if it's happening because an entity is being despawned.

@Jondolf Jondolf added A-Dynamics Relates to rigid body dynamics: motion, mass, constraint solving, joints, CCD, and so on P-Crash A sudden unexpected crash labels Dec 28, 2024
@Jondolf Jondolf merged commit 2ebab52 into avianphysics:main Dec 28, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Dynamics Relates to rigid body dynamics: motion, mass, constraint solving, joints, CCD, and so on P-Crash A sudden unexpected crash

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Despawning Entities that have a NoAutoCenterOfMass, NoAutoAngularInertia, or NoAutoMass component causes panic

2 participants