Jump to content
  • Advertisement
Sign in to follow this  
fatihtolgaata

how to find Character's position in the World?

This topic is 4866 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

Hi, I was able to put my Skinned Mesh Character Animation to Direct3D World. in 3ds Max, My Character is walking from begin_position to finish_position. I want to make loop this animation in DirectX. So, beginning of the each animation, I have to find the new position of my character. I must write like this: Device->BeginScene(); Device->SetTransform(D3DTS_WORLD, &NewPositionOfCharacter); MyCharacter->DoAnimation; Device->EndScene(); But How can I determine and find the New position of character after finishing the animation?

Share this post


Link to post
Share on other sites
Advertisement
What bones does your character have near it's root? Are you using a model from character studio? A pre-made model like Tiny?

If you inspect the matrices of one of the top-level bones, you'll notice the matrix translation coordinates (._41, ._42, and ._43) will keep climbing. Those three attributes of that matrix is your character's position, in x,y,z order.

Share this post


Link to post
Share on other sites
Hi there :)
I can think of a number of ways to do this.

Option 1
Don't move the character around with animation but do this with a Matrix. The matrix will then give you the details as to where the character is in space


Option2
Is a technique that Jiia already specified is the extract the matrix information when you need the coordinates.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!