Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provide Intersection.distanceToRay for all objects #30479

Closed
trusktr opened this issue Feb 7, 2025 · 1 comment
Closed

provide Intersection.distanceToRay for all objects #30479

trusktr opened this issue Feb 7, 2025 · 1 comment
Milestone

Comments

@trusktr
Copy link
Contributor

trusktr commented Feb 7, 2025

Description

Not all objects provide distanceToRay when raycasting.

Solution

See Points.raycast. Seems easy to add to other objects for consistency.

Alternatives

don't add

Additional context

I updated the docs in

but it would be better (and seemingly easy) to just add this property to Intersections of all objects.

@Mugen87
Copy link
Collaborator

Mugen87 commented Feb 8, 2025

The metric distanceToRay is added for points since it is already computed for the ray-points intersection test.

For meshes, it would be necessary to compute is separately although most use cases don't require it. So to avoid unnecessary overhead, it's better to let the app compute the distance.

@Mugen87 Mugen87 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 13, 2025
@Mugen87 Mugen87 added this to the r174 milestone Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants