aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/plugins/multimesh_editor_plugin.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2017-01-10 22:22:56 -0300
committerGitHub2017-01-10 22:22:56 -0300
commit0acd4fccd566fdb074aebac01046b1e80c64b2dc (patch)
treedefce0bc5663677db80fa6adfe7214b2ee10eac4 /tools/editor/plugins/multimesh_editor_plugin.cpp
parent4338c9016347159d9562a5435e4c81afc21a362a (diff)
parent6b1252cdfa5988b77917518bc291a0cc34e5066e (diff)
downloadgodot-0acd4fccd566fdb074aebac01046b1e80c64b2dc.tar.gz
godot-0acd4fccd566fdb074aebac01046b1e80c64b2dc.tar.zst
godot-0acd4fccd566fdb074aebac01046b1e80c64b2dc.zip
Merge pull request #7438 from tagcup/matrix3_rotate_fix
Fix the order in which additional transformations are applied
Diffstat (limited to 'tools/editor/plugins/multimesh_editor_plugin.cpp')
-rw-r--r--tools/editor/plugins/multimesh_editor_plugin.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/editor/plugins/multimesh_editor_plugin.cpp b/tools/editor/plugins/multimesh_editor_plugin.cpp
index b27a66c5f..f70eb1fdd 100644
--- a/tools/editor/plugins/multimesh_editor_plugin.cpp
+++ b/tools/editor/plugins/multimesh_editor_plugin.cpp
@@ -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();