Sign in to follow this  

can Somebody please help me with this Intersected Triangle

Recommended Posts

hey there, well the problem is that when I go to render the Vertex buffer that I put the selected Triangle returned from the D3DXIntersect function using the face member. It makes the triangle but its not in the same location that I clicked when it gets rendered. I apply the world transform for the sphere and it renders ok but the dam triange is in its own position and it's not the right size. What could be wrong is it that I need to normalize it or something. here is the code I use to fill the VB with the triangle data.
vThisTri = &v[iIntersection * 3];
iThisTri = &pIndices[3* pIntersection->dwFace];
// get vertices hit this should be the triangle
vThisTri[0] = pVertices[iThisTri[0]];
vThisTri[1] = pVertices[iThisTri[1]];
vThisTri[2] = pVertices[iThisTri[2]];

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this