diff options
| author | Juan Linietsky | 2017-01-03 23:20:20 -0300 |
|---|---|---|
| committer | GitHub | 2017-01-03 23:20:20 -0300 |
| commit | 3a0c19d3f6ddb26359c95d84c376a8e6b1afd04d (patch) | |
| tree | 8e313066ce55a3366cd6b972ff429372583cda28 /tools/editor/plugins/multimesh_editor_plugin.cpp | |
| parent | f2e99826c0b1e8227644bfab0795d858c504d279 (diff) | |
| parent | bd7ba0b664fa98381db9ef8edb69ba211213d595 (diff) | |
| download | godot-3a0c19d3f6ddb26359c95d84c376a8e6b1afd04d.tar.gz godot-3a0c19d3f6ddb26359c95d84c376a8e6b1afd04d.tar.zst godot-3a0c19d3f6ddb26359c95d84c376a8e6b1afd04d.zip | |
Merge pull request #6865 from tagcup/godot_issue_6816
Use right handed coordinate system for rotation matrices and quaternions. Also fixed Euler angles (XYZ convention).
Diffstat (limited to 'tools/editor/plugins/multimesh_editor_plugin.cpp')
| -rw-r--r-- | tools/editor/plugins/multimesh_editor_plugin.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/editor/plugins/multimesh_editor_plugin.cpp b/tools/editor/plugins/multimesh_editor_plugin.cpp index 22981a287..a548f26f1 100644 --- a/tools/editor/plugins/multimesh_editor_plugin.cpp +++ b/tools/editor/plugins/multimesh_editor_plugin.cpp @@ -207,10 +207,10 @@ void MultiMeshEditor::_populate() { Transform axis_xform; if (axis==Vector3::AXIS_Z) { - axis_xform.rotate(Vector3(1,0,0),Math_PI*0.5); + axis_xform.rotate(Vector3(1,0,0),-Math_PI*0.5); } if (axis==Vector3::AXIS_X) { - axis_xform.rotate(Vector3(0,0,1),Math_PI*0.5); + axis_xform.rotate(Vector3(0,0,1),-Math_PI*0.5); } for(int i=0;i<instance_count;i++) { @@ -238,9 +238,9 @@ 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(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); xform.basis = post_xform * xform.basis; //xform.basis.orthonormalize(); |
