PDA

View Full Version : RayMeshGridIntersect


Banemus
08-19-2009, 02:42 PM
Hey,

I am looking for a way to get the world coordinations of the RayHit using RayMeshGridIntersect.
Anyone around here that knows a solution?

I can get the face that was hitted and the vertex positions of it. But for some reason I can't seem to get the right position for the RayHit.

Thx ahead.

denisT
08-19-2009, 07:40 PM
Hey,

I am looking for a way to get the world coordinations of the RayHit using RayMeshGridIntersect.
Anyone around here that knows a solution?

I can get the face that was hitted and the vertex positions of it. But for some reason I can't seem to get the right position for the RayHit.

Thx ahead.

you have intersection ray (r) which is position and direction
you get hit distance (d) which is a distance from ray's position to a hit

to get hit position you have pos = (normalize r.dir) * d + r.pos

CGTalk Moderation
08-19-2009, 07:40 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.