From bd7ba0b664fa98381db9ef8edb69ba211213d595 Mon Sep 17 00:00:00 2001 From: Ferenc Arn Date: Tue, 18 Oct 2016 15:50:21 -0500 Subject: Use right handed coordinate system for rotation matrices and quaternions. Also fixes Euler angles (XYZ convention, which is used as default by Blender). Furthermore, functions which expect a rotation matrix will now give an error simply, rather than trying to orthonormalize such matrices. The documentation for such functions has be updated accordingly. This commit breaks code using 3D rotations, and is a part of the breaking changes in 2.1 -> 3.0 transition. The code affected within Godot code base is fixed in this commit. --- tools/editor/plugins/mesh_editor_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/editor/plugins/mesh_editor_plugin.cpp') diff --git a/tools/editor/plugins/mesh_editor_plugin.cpp b/tools/editor/plugins/mesh_editor_plugin.cpp index 785efebfc..13f3204a0 100644 --- a/tools/editor/plugins/mesh_editor_plugin.cpp +++ b/tools/editor/plugins/mesh_editor_plugin.cpp @@ -82,8 +82,8 @@ void MeshEditor::_notification(int p_what) { void MeshEditor::_update_rotation() { Transform t; - t.basis.rotate(Vector3(0, 1, 0), rot_y); - t.basis.rotate(Vector3(1, 0, 0), rot_x); + t.basis.rotate(Vector3(0, 1, 0), -rot_y); + t.basis.rotate(Vector3(1, 0, 0), -rot_x); mesh_instance->set_transform(t); } -- cgit v1.2.3-70-g09d2