Skip to content

Fix body property of collision events and reflect CollisionEventsEnabled properly#752

Merged
Jondolf merged 3 commits into
mainfrom
fix-collision-event-bugs
Jun 1, 2025
Merged

Fix body property of collision events and reflect CollisionEventsEnabled properly#752
Jondolf merged 3 commits into
mainfrom
fix-collision-event-bugs

Conversation

@Jondolf

@Jondolf Jondolf commented Jun 1, 2025

Copy link
Copy Markdown
Member

Objective

Fixes #750

Someone (me) somehow got the entities mixed up for the body property of the OnCollisionStart and OnCollisionEnded events. It is documented to be the body of the entity that hit trigger.target(), but it is in fact the body associated with the trigger.target() itself. Yikes!

Additionally, the CollisionEventsEnabled type doesn't reflect Component and isn't registered. This breaks scenes.

Solution

Fix body to be the body of the entity that hit trigger.target(), and reflect Component for CollisionEventsEnabled.

This is critical enough that I'll make a 0.3.1 patch release with it soon.

@Jondolf Jondolf added C-Bug Something isn't working A-Collision Relates to the broad phase, narrow phase, colliders, or other collision functionality labels Jun 1, 2025
@Jondolf Jondolf merged commit 3da1133 into main Jun 1, 2025
6 checks passed
@Jondolf Jondolf deleted the fix-collision-event-bugs branch June 1, 2025 22:17
Jondolf added a commit that referenced this pull request Jun 5, 2025
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.

CollisionEventsEnabled does not reflect Component

1 participant