How to check the order of mesh hit by a ray #4247
Answered
by
Grantim
ParvGuptaSpCT
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
Grantim
Mar 11, 2025
Replies: 2 comments 1 reply
-
Hello! You can just compare |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ParvGuptaSpCT
-
Another way to find which part is upper is to compare hole normal with PlusZ direction: looksUp = mm.dot( -mesh.holeDirArea( mesh.topology.findHoleRepresentiveEdges()[0] ), mm.Vector3d(0,0,1) ) > 0.0 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello!
You can just compare
rayIntersectoinResult.distanceAlongLine
from both intersections to determine which one is closer to origin of the ray