1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-15 13:51:40 +00:00

Merge pull request #7438 from tagcup/matrix3_rotate_fix

Fix the order in which additional transformations are applied
This commit is contained in:
Juan Linietsky
2017-01-10 22:22:56 -03:00
committed by GitHub
8 changed files with 104 additions and 73 deletions

View File

@@ -238,9 +238,10 @@ void MultiMeshEditor::_populate() {
Matrix3 post_xform;
post_xform.rotate(xform.basis.get_axis(0),-Math::random(-_tilt_random,_tilt_random)*Math_PI);
post_xform.rotate(xform.basis.get_axis(2),-Math::random(-_tilt_random,_tilt_random)*Math_PI);
post_xform.rotate(xform.basis.get_axis(1),-Math::random(-_rotate_random,_rotate_random)*Math_PI);
post_xform.rotate(xform.basis.get_axis(2),-Math::random(-_tilt_random,_tilt_random)*Math_PI);
post_xform.rotate(xform.basis.get_axis(0),-Math::random(-_tilt_random,_tilt_random)*Math_PI);
xform.basis = post_xform * xform.basis;
//xform.basis.orthonormalize();