diff options
author | reduz <reduzio@gmail.com> | 2021-10-21 13:38:20 -0300 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2021-10-25 14:34:00 -0300 |
commit | d03b7fbe090dca1f9ea4190116ac0efbee37e929 (patch) | |
tree | 5d7db71d15925908cf87483526e6716cba0bef65 /servers/physics_3d/joints | |
parent | 5ff0624a073fe580b7f26b94f6e242462b67bc2a (diff) |
Refactored Node3D rotation modes
* Made the Basis euler orders indexed via enum.
* Node3D has a new rotation_order property to choose Euler rotation order.
* Node3D has also a rotation_mode property to choose between Euler, Quaternion and Basis
Exposing these modes as well as the order makes Godot a lot friendlier for animators, which can choose the best way to interpolate rotations.
The new *Basis* mode makes the (exposed) transform property obsolete, so it was removed (can still be accessed by code of course).
Diffstat (limited to 'servers/physics_3d/joints')
-rw-r--r-- | servers/physics_3d/joints/godot_generic_6dof_joint_3d.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/physics_3d/joints/godot_generic_6dof_joint_3d.cpp b/servers/physics_3d/joints/godot_generic_6dof_joint_3d.cpp index d7e0537439..b88e2d1190 100644 --- a/servers/physics_3d/joints/godot_generic_6dof_joint_3d.cpp +++ b/servers/physics_3d/joints/godot_generic_6dof_joint_3d.cpp @@ -232,7 +232,7 @@ GodotGeneric6DOFJoint3D::GodotGeneric6DOFJoint3D(GodotBody3D *rbA, GodotBody3D * void GodotGeneric6DOFJoint3D::calculateAngleInfo() { Basis relative_frame = m_calculatedTransformB.basis.inverse() * m_calculatedTransformA.basis; - m_calculatedAxisAngleDiff = relative_frame.get_euler_xyz(); + m_calculatedAxisAngleDiff = relative_frame.get_euler(Basis::EULER_ORDER_XYZ); // in euler angle mode we do not actually constrain the angular velocity // along the axes axis[0] and axis[2] (although we do use axis[1]) : |