I have a 3d Model that it wasn't made from the origin of the 3d program, lets say that it was built at
(100, 100, 100), I know how to rotate a model, but around the model origin point,
(0, 0, 0), now how can I rotate the model around its own center? In this example the
(100, 100, 100) so that instead of going around the origin point (like the earth around the sun) it will rotate around its own center (like the earth rotation around its center) so I can create an effect of the earth rotating around the sun and rotating around its own center.
Here's my code:
modelTransform = (Matrix.CreateScale(3f, 3f, 3f) * Matrix.CreateRotationX(rotation) * Matrix.CreateTranslation(myModel.Position)); effect.World = transform[mesh.ParentBone.Index] * modelTransform;
with this code my earth is rotating around the sun, but I have no idea how to rotate it around its own center.