Skip to content

Conversation

@Jondolf
Copy link
Member

@Jondolf Jondolf commented Jan 26, 2025

Objective

Fixes #533

There is currently a bug where despawning an entity as soon as a collision starts never ends up removing the collision, meaning that CollisionEnded is not sent and the despawned entity is not removed from CollidingEntities. This is caused by collision states not being updated correctly for despawns.

Solution

Reset the collision states when an entity is missing such that the collision will be treated as ended.

Note that the way this is handled will change substantially when we implement a contact graph and rework contact management, but regardless, I think it is important to have a fix for it now as it is a serious bug.

@Jondolf Jondolf added C-Bug Something isn't working A-Collision Relates to the broad phase, narrow phase, colliders, or other collision functionality labels Jan 26, 2025
@Jondolf Jondolf enabled auto-merge (squash) January 26, 2025 12:35
@Jondolf Jondolf merged commit fa9b898 into main Jan 26, 2025
5 checks passed
@Jondolf Jondolf deleted the fix-despawn-collision-end branch January 26, 2025 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Collision Relates to the broad phase, narrow phase, colliders, or other collision functionality C-Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Despawned entitiy in CollidingEntities?

2 participants