mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
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).
This commit is contained in:
@@ -68,7 +68,7 @@ void RemoteTransform3D::_update_remote() {
|
||||
Transform3D our_trans = get_global_transform();
|
||||
|
||||
if (update_remote_rotation) {
|
||||
n->set_rotation(our_trans.basis.get_rotation());
|
||||
n->set_rotation(our_trans.basis.get_euler_normalized(Basis::EulerOrder(n->get_rotation_order())));
|
||||
}
|
||||
|
||||
if (update_remote_scale) {
|
||||
@@ -90,7 +90,7 @@ void RemoteTransform3D::_update_remote() {
|
||||
Transform3D our_trans = get_transform();
|
||||
|
||||
if (update_remote_rotation) {
|
||||
n->set_rotation(our_trans.basis.get_rotation());
|
||||
n->set_rotation(our_trans.basis.get_euler_normalized(Basis::EulerOrder(n->get_rotation_order())));
|
||||
}
|
||||
|
||||
if (update_remote_scale) {
|
||||
|
||||
Reference in New Issue
Block a user