mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 12:12:28 +00:00
Merge pull request #90584 from BMagnu/fix_global_rotation_matrix
Fix `Node3D.set_global_rotation()` resetting node scale.
This commit is contained in:
commit
d2ec3714d7
@ -293,7 +293,7 @@ Vector3 Node3D::get_global_rotation_degrees() const {
|
||||
void Node3D::set_global_rotation(const Vector3 &p_euler_rad) {
|
||||
ERR_THREAD_GUARD;
|
||||
Transform3D transform = get_global_transform();
|
||||
transform.basis = Basis::from_euler(p_euler_rad);
|
||||
transform.basis = Basis::from_euler(p_euler_rad) * Basis::from_scale(transform.basis.get_scale());
|
||||
set_global_transform(transform);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user