Hello Community,
i have a big Problem, i want to rotate a cube around the Y axis and after it, to move it on the X axis, but the cube still move on the X axis and not in the angle, i had rotated it befor and i don't know what i made wrong, maybe you guys can help me and find a solution?
Here's my code:
Matrix scale = Matrix.Scaling(this.scale);
Matrix rotation = Matrix.RotationYawPitchRoll(Mathematics.DegreesToRadians(rotate.Y),
Mathematics.DegreesToRadians(rotate.X),
Mathematics.DegreesToRadians(rotate.Z));
this.side = Vector3.TransformNormal(Vector3.UnitX, rotation);
this.up = Vector3.TransformNormal(Vector3.UnitY, rotation);
this.look = Vector3.TransformNormal(Vector3.UnitZ, rotation);
Matrix rotation = Matrix.LookAtLH(this.translate, this.pivot.Look, this.pivot.Up);
rotation.M13 = -rotation.M13;
rotation.M31 = -rotation.M31;
Matrix translate = Matrix.Translation(this.translate);
this.world = (scale * rotation * translate);
Greets