Sign in to follow this  

Getting world space position from mesh space position

This topic is 1878 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Resolved after multiplying the world space matrix with the mesh space matrix, can anyone tell me if I'm setting up the vision correctly?

Share this post


Link to post
Share on other sites

This topic is 1878 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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