Skip to content

allow accessing entity from intersections callback#966

Open
PROMETHIA-27 wants to merge 2 commits into
avianphysics:mainfrom
PROMETHIA-27:entity-in-intersections
Open

allow accessing entity from intersections callback#966
PROMETHIA-27 wants to merge 2 commits into
avianphysics:mainfrom
PROMETHIA-27:entity-in-intersections

Conversation

@PROMETHIA-27
Copy link
Copy Markdown

Objective

Adds a new parameter to the callback in MoveAndSlide::intersections, to allow accessing the intersected entity.

Solution

Adds a new parameter to the relevant callback.

Testing

The change is extremely simple so as long as the logic is correct, it shouldn't need extensive testing.
I ran cargo test to try and catch all places that needed to be updated in the repo, and use the same logic in a vendored version of the function in a project and it has worked correctly so far.

I did see 4 failures in the cargo test but they seemed to be minor precision issues; float equality comparisons off by 0.0001 or so. Probably unrelated to the changes in this PR.

Copy link
Copy Markdown
Member

@Jondolf Jondolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM once CI passes. Looks like a trivial error with a doc test missing the parameter

@Jondolf Jondolf added C-Feature A new feature, making something new possible M-Migration-Guide A breaking change to Avian's public API that needs to be noted in a migration guide D-Trivial Nice and straightforward! A great choice to get started with Avian A-Character-Controller Relates to character controllers X-Uncontroversial This work is generally agreed upon labels Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Character-Controller Relates to character controllers C-Feature A new feature, making something new possible D-Trivial Nice and straightforward! A great choice to get started with Avian M-Migration-Guide A breaking change to Avian's public API that needs to be noted in a migration guide X-Uncontroversial This work is generally agreed upon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants