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 ?