Reputation:
What is difference between the two rotation matrices? I do not understand why the result is different between rotationxyz and rotxyz?
Matrix4 rotationXYZ = Matrix4.CreateRotationX(5) * Matrix4.CreateRotationY(5) * Matrix4.CreateRotationZ(5);
Matrix4 rotXYZ = Matrix4.Identity;
Matrix4.CreateRotationX(5, out rotXYZ);
Matrix4.CreateRotationY(5, out rotXYZ);
Matrix4.CreateRotationZ(5, out rotXYZ);`
Upvotes: 0
Views: 149
Reputation: 11
The method Matrix4.CreateRotation#(5, out rotXYZ) build new rotXYZ matrix. I.e. you three times overwrite rotXYZ.
Upvotes: 1