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

MeshLineRaycast early exit never enters #122

Open
opcode1 opened this issue Dec 17, 2020 · 0 comments
Open

MeshLineRaycast early exit never enters #122

opcode1 opened this issue Dec 17, 2020 · 0 comments

Comments

@opcode1
Copy link

opcode1 commented Dec 17, 2020

I was trying to figure out raycasting with MeshLine and found that the early exit optimization never gets called when you don't intersect the sphere.
if (raycaster.ray.intersectSphere(sphere, interRay) === false) { return }
Should be:
if (raycaster.ray.intersectSphere(sphere, interRay) === null) { return }

Not really a factor for most cases but for mouseover with a lot of geometry might make a difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant