# How to use D3DXIntersectTri function to find intersected point?

How to calculate direction for D3DXIntersectTri function to find intersected point? And after getting the result in Distance how to get that coordinate(XYZ)?

• If you pass vectors p and d as ray position and direction, the returned value in pDist will tell you how far along the ray the point of intersection is. You can retrieve it by computing p + pDist * d assuming d is normalized. Also, it would be good to refrain from using all caps in your posts. – Mokosha Apr 9 '13 at 20:14