Sign in to follow this  
Medo Mex

Getting world space position from mesh space position

Recommended Posts

Medo Mex    891
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?

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