Hey i am trying to move and rotate a Mesh. I am using DirectX 9 and C#.
I can move my Mesh backwards and forwards, along the Z axis. But the mesh rotates about a fixed point, the point from where the Mesh was first drawn.
heres the code i am using to draw the Mesh
I does rotate but about the wrong point? any ideas?Code:device.Transform.World = Matrix.Scaling(Scale,Scale,Scale) * Matrix.Translation(new Vector3(m_X,m_Y,m_Z)) * Matrix.RotationY( m_Rotation); for(int i = 0; i < carMaterials.Length; i++) { device.Material = carMaterials[i]; device.SetTexture(0,carTextures[i]); carMesh.DrawSubset(i); }
Thanks




Reply With Quote