Skip to content

Add RayCaster::get(_global)_point#971

Merged
Jondolf merged 5 commits into
avianphysics:mainfrom
simgine:ray-helpers
Apr 15, 2026
Merged

Add RayCaster::get(_global)_point#971
Jondolf merged 5 commits into
avianphysics:mainfrom
simgine:ray-helpers

Conversation

@Shatur

@Shatur Shatur commented Apr 11, 2026

Copy link
Copy Markdown
Contributor

Objective

Fixes #968.

Solution

Add the mentioned methods.

Testing

I didn't test it, but the change is trivial. I did similar to what Bevy does:

https://docs.rs/bevy_math/0.18.1/src/bevy_math/ray.rs.html#97

Shatur added 4 commits April 12, 2026 01:26
I used `get_global_point` since
it's what most users probably want.
Looks like when `f64` is enabled, it doesn't
compile since `Dir2/3` is always `Vec2/3`, while
origin is `DVec2/3`.

I made these methods always work with F32.
@Jondolf Jondolf added C-Feature A new feature, making something new possible A-Spatial-Query Relates to spatial queries, such as ray casting, shape casting, and intersection tests D-Trivial Nice and straightforward! A great choice to get started with Avian labels Apr 13, 2026
Comment thread src/spatial_query/ray_caster.rs
Co-authored-by: Joona Aalto <jondolf.dev@gmail.com>
@Shatur Shatur requested a review from Jondolf April 13, 2026 22:06

@Jondolf Jondolf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@Jondolf Jondolf merged commit 94c284d into avianphysics:main Apr 15, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Spatial-Query Relates to spatial queries, such as ray casting, shape casting, and intersection tests C-Feature A new feature, making something new possible D-Trivial Nice and straightforward! A great choice to get started with Avian

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add get_point helper to RayCaster

2 participants