Sign in to follow this  
Followers 0
Medo Mex

Getting world space position from mesh space position

1 post in this topic

I'm loading .x file hierarchy, so I have different frames, when the mesh is moving I want to get the position of the eyes, so I added a sphere exactly infront of the eyes in the 3D modeling software, and trying to get the WORLD position for that sphere instead of the mesh position.

I'm using the following code and getting the same position no matter where the model move:
[CODE]
D3DXVECTOR3 GetEyesPosition()
{
D3DXFRAME_EXTENDED* frame = (D3DXFRAME_EXTENDED*)D3DXFrameFind(m_frameRoot, "eyesSphere");
return D3DXVECTOR3(frame->TransformationMatrix._41, frame->TransformationMatrix._42, frame->TransformationMatrix._43);
}
[/CODE]


How do I calculate the frame world space position?
0

Share this post


Link to post
Share on other sites
Resolved after multiplying the world space matrix with the mesh space matrix, can anyone tell me if I'm setting up the vision correctly?
0

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  
Followers 0