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

Quick question about the sign in TestRayOBBIntersection function #124

Open
DokyeongLee-3 opened this issue Aug 1, 2022 · 0 comments
Open

Comments

@DokyeongLee-3
Copy link

DokyeongLee-3 commented Aug 1, 2022

Before the question, I am not familiar with math. Sorry for that. I have seen material about obb ray collision

image

I understand the equation and saw the TestRayOBBIntersection function

It says

		float t1 = (e+aabb_min.x)/f; // Intersection with the "left" plane
		float t2 = (e+aabb_max.x)/f; // Intersection with the "right" plane

But I can not understand why the sign of variable "e" is '+' not '-' in the t1, t2 variable since it corresponds with - N dot O in the above equation in the figure.

Can you elaborate on this one?

Best regards

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