diff options
| author | Juan Linietsky <reduzio@gmail.com> | 2017-01-03 23:20:20 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-01-03 23:20:20 -0300 |
| commit | 3a0c19d3f6ddb26359c95d84c376a8e6b1afd04d (patch) | |
| tree | 8e313066ce55a3366cd6b972ff429372583cda28 /modules | |
| parent | f2e99826c0b1e8227644bfab0795d858c504d279 (diff) | |
| parent | bd7ba0b664fa98381db9ef8edb69ba211213d595 (diff) | |
| download | redot-engine-3a0c19d3f6ddb26359c95d84c376a8e6b1afd04d.tar.gz | |
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 'modules')
| -rw-r--r-- | modules/gridmap/grid_map_editor_plugin.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp index eb712e49cb..dada7fcc9e 100644 --- a/modules/gridmap/grid_map_editor_plugin.cpp +++ b/modules/gridmap/grid_map_editor_plugin.cpp @@ -103,13 +103,13 @@ void GridMapEditor::_menu_option(int p_option) { if (input_action==INPUT_DUPLICATE) { r.set_orthogonal_index(selection.duplicate_rot); - r.rotate(Vector3(0,1,0),Math_PI/2.0); + r.rotate(Vector3(0,1,0),-Math_PI/2.0); selection.duplicate_rot=r.get_orthogonal_index(); _update_duplicate_indicator(); break; } r.set_orthogonal_index(cursor_rot); - r.rotate(Vector3(0,1,0),Math_PI/2.0); + r.rotate(Vector3(0,1,0),-Math_PI/2.0); cursor_rot=r.get_orthogonal_index(); _update_cursor_transform(); } break; @@ -118,14 +118,14 @@ void GridMapEditor::_menu_option(int p_option) { if (input_action==INPUT_DUPLICATE) { r.set_orthogonal_index(selection.duplicate_rot); - r.rotate(Vector3(1,0,0),Math_PI/2.0); + r.rotate(Vector3(1,0,0),-Math_PI/2.0); selection.duplicate_rot=r.get_orthogonal_index(); _update_duplicate_indicator(); break; } r.set_orthogonal_index(cursor_rot); - r.rotate(Vector3(1,0,0),Math_PI/2.0); + r.rotate(Vector3(1,0,0),-Math_PI/2.0); cursor_rot=r.get_orthogonal_index(); _update_cursor_transform(); } break; @@ -134,35 +134,35 @@ void GridMapEditor::_menu_option(int p_option) { if (input_action==INPUT_DUPLICATE) { r.set_orthogonal_index(selection.duplicate_rot); - r.rotate(Vector3(0,0,1),Math_PI/2.0); + r.rotate(Vector3(0,0,1),-Math_PI/2.0); selection.duplicate_rot=r.get_orthogonal_index(); _update_duplicate_indicator(); break; } r.set_orthogonal_index(cursor_rot); - r.rotate(Vector3(0,0,1),Math_PI/2.0); + r.rotate(Vector3(0,0,1),-Math_PI/2.0); cursor_rot=r.get_orthogonal_index(); _update_cursor_transform(); } break; case MENU_OPTION_CURSOR_BACK_ROTATE_Y: { Matrix3 r; r.set_orthogonal_index(cursor_rot); - r.rotate(Vector3(0,1,0),-Math_PI/2.0); + r.rotate(Vector3(0,1,0),Math_PI/2.0); cursor_rot=r.get_orthogonal_index(); _update_cursor_transform(); } break; case MENU_OPTION_CURSOR_BACK_ROTATE_X: { Matrix3 r; r.set_orthogonal_index(cursor_rot); - r.rotate(Vector3(1,0,0),-Math_PI/2.0); + r.rotate(Vector3(1,0,0),Math_PI/2.0); cursor_rot=r.get_orthogonal_index(); _update_cursor_transform(); } break; case MENU_OPTION_CURSOR_BACK_ROTATE_Z: { Matrix3 r; r.set_orthogonal_index(cursor_rot); - r.rotate(Vector3(0,0,1),-Math_PI/2.0); + r.rotate(Vector3(0,0,1),Math_PI/2.0); cursor_rot=r.get_orthogonal_index(); _update_cursor_transform(); } break; |
