Original Post
Hi, guys. I'm a 3D newb. I'm using C# and DX9.Net. I researched the technique of ray picking, but there are some things I'm unclear about. Here's what I understand so far, and what I don't: 1. Use Vector3.Unproject() to convert the screen coordinates to a 3d ray. I don't understand some of the arguments, however: viewport - I'm assuming this is the picturebox/whatever. But why does the method need this? Also, the vector I perform this method on, is it (x,y,0) or what? 2. Find triangle and U,V coords of intersection between the mesh and the ray. Now, I can use Mesh.Intersect((x,y,0),ray,IntersectionInfo) to find the index of the triangle and its UV coords. However, I have no idea how to get the actual triangle or the vertices of the triangle - I only know its index. Furthermore, how do I figure out the position of the intersection based on the UV coords? Ultimately, I want to find the exact position of the intersection in Mesh coords. Thanks for helping me. PS - Is the origin of the Mesh returned by Mesh.Sphere at the center of the sphere?