• Advertisement
Sign in to follow this  

get mesh position

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

Hy. How i can find the position of a mesh in the word space? Is usefully for switch the camera closest to an object. thanks.

Share this post


Link to post
Share on other sites
Advertisement
If you have a world matrix that you use to transform the mesh for rendering, then you can access the translation part of the matrix by pulling out the _41, _42, and _43 elements of the matrix. Those three components from the X, Y, and Z values of a vector representing the position where the mesh will be centered.

Share this post


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

  • Advertisement