Skip to content

Include rigid body entity in OnCollisionStart and OnCollisionEnd#717

Merged
Jondolf merged 1 commit into
mainfrom
collision-event-rb-entity
May 4, 2025
Merged

Include rigid body entity in OnCollisionStart and OnCollisionEnd#717
Jondolf merged 1 commit into
mainfrom
collision-event-rb-entity

Conversation

@Jondolf

@Jondolf Jondolf commented May 4, 2025

Copy link
Copy Markdown
Member

Objective

#704 added observable OnCollisionStart and OnCollisionEnd events. However, they only provide the collider entity, and that is also just behind a nameless tuple field. It could be nicer to use named fields and also provide the rigid body entity.

Solution

Use named collider and rigid_body fields. rigid_body is None if the collider is not attached to a rigid body.

@Jondolf Jondolf added A-Collision Relates to the broad phase, narrow phase, colliders, or other collision functionality C-Usability A quality-of-life improvement that makes Avian easier to use labels May 4, 2025
@Jondolf Jondolf added this to the 0.3 milestone May 4, 2025
@Jondolf Jondolf merged commit e22bcab into main May 4, 2025
5 checks passed
@Jondolf Jondolf deleted the collision-event-rb-entity branch May 4, 2025 12:30
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-Usability A quality-of-life improvement that makes Avian easier to use

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant