Jump to content
  • Advertisement
Sign in to follow this  
Azzazelus

XMVector3TransformCoord

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

Hello. I'm working with DirectX 11 and C++. I have a mesh with some vertices and some generated points for the bounding box (min and max vertice). I also have the transformation matrix for that mesh. When I render the mesh and another generated mesh for debug made from the min and max bounding points it renders them correctly. I just send the world transformation matrix to both original mesh and bounding mesh and everything is ok. But I want to make a function that will detect the distance between the camera (player position) and the mesh. So I need to transform the boundind vertices from local to world space and I'm using XMVector3TransformCoord(boundingVectorMin, transformationMatrix) and I get weird results. The matrix is the same as for the original mesh but when I transform the bounding vertices with that matrix (XMVector3TransformCoord) and render them with Identity matrix in the shader I dont get the same result as when I send the original matrix to the shader.

Any idea why this happens ? 

Edited by Azzazelus

Share this post


Link to post
Share on other sites
Advertisement
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!