We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When ray is parallel to plane function intersectRayPlane returns true.
Eg glm::intersectRayPlane(glm::vec3(0.0f, 1.0f, 0.0f), glm::vec3(1.0f, 0.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 1.0f, 0.0f), dist)
Problem can be solved by inverting sign of epsilon check:
if(d < -Epsilon) { intersectionDistance = glm::dot(planeOrig - orig, planeNormal) / d; return true; } return false;
Edit: not sure how to handle case when plane and ray lies on same plane, since there are inifinite solutions.
The text was updated successfully, but these errors were encountered:
Fixed intersectRayPlane returns true in parallel case #578
ef4425a
This issue is fixed in both master and 0.9.8 branch with your proposed fix.
Thanks for contributing, Christophe
Sorry, something went wrong.
Groovounet
No branches or pull requests
When ray is parallel to plane function intersectRayPlane returns true.
Eg glm::intersectRayPlane(glm::vec3(0.0f, 1.0f, 0.0f), glm::vec3(1.0f, 0.0f, 0.0f), glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3(0.0f, 1.0f, 0.0f), dist)
Problem can be solved by inverting sign of epsilon check:
Edit: not sure how to handle case when plane and ray lies on same plane, since there are inifinite solutions.
The text was updated successfully, but these errors were encountered: