Skip to content

Conversation

@nicebenny23
Copy link
Contributor

Objective

  • Simplify the usage of ray2d and ray3d in example/user code.

Solution

-Added a plane_intersection_point method, making the usage of rays more intuitive.
-This method simplifies 2 out of 4 examples that previously had to manually calculate intersection points using intersect_plane + get_point.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

@alice-i-cecile alice-i-cecile added C-Usability A targeted quality-of-life change that makes Bevy easier to use A-Math Fundamental domain-agnostic mathematical operations S-Needs-Review Needs reviewer attention (from anyone!) to move forward D-Straightforward Simple bug fixes and API improvements, docs, test and examples labels Jan 5, 2026
None
}

/// Returns the intersection point with a plane, if it exists.
Copy link
Member

Choose a reason for hiding this comment

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

These docs should call out that it's a combination of the other two methods.

}

/// Get the distance to a plane if the ray intersects it
/// Returns the distance to a plane if the ray intersects it.
Copy link
Member

Choose a reason for hiding this comment

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

We should mention the new method here too :)

@alice-i-cecile alice-i-cecile added the X-Uncontroversial This work is generally agreed upon label Jan 6, 2026
@IQuick143 IQuick143 added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jan 6, 2026
Co-authored-by: IQuick 143 <[email protected]>
@alice-i-cecile alice-i-cecile added this to the 0.18 milestone Jan 6, 2026
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jan 6, 2026
Merged via the queue into bevyengine:main with commit b8ff92f Jan 6, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Math Fundamental domain-agnostic mathematical operations C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it X-Uncontroversial This work is generally agreed upon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants