I try to rotate a 3D cube on itself from its center, not the edge. Here is my code used.
public rotatemyCube()
{
...
Matrix newTransform = Matrix.CreateScale(scale) * Matrix.CreateRotationY(rotationLoot) * Matrix.CreateTranslation(translation);
my3Dcube.Transform = newTransform;
....
public void updateRotateCube()
{
rotationLoot += 0.01f;
}
My cube rotate fine, but not from the center. Here is a schematic that explains my problem.
And i need this: