diff options
author | tagcup <tagcup@yahoo.com> | 2018-05-16 20:32:35 -0400 |
---|---|---|
committer | tagcup <tagcup@yahoo.com> | 2018-05-17 19:39:04 -0400 |
commit | 1bba6eeeb9f0898308e5b96f6f996c2fbabe55ee (patch) | |
tree | aad72201537119f20810b0e04a7b215a60731586 /scene/3d/spatial.cpp | |
parent | ba134d44b8a5d87cf3694dd8858ec2a495bf6c11 (diff) | |
download | redot-engine-1bba6eeeb9f0898308e5b96f6f996c2fbabe55ee.tar.gz |
Removed incorrect Basis::set_scale().
Also added a missing constructor in Basis, and fixed usage of inverse and affine inverse in Transform.
Diffstat (limited to 'scene/3d/spatial.cpp')
-rw-r--r-- | scene/3d/spatial.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp index 748aa8aad4..160a8aa9a7 100644 --- a/scene/3d/spatial.cpp +++ b/scene/3d/spatial.cpp @@ -632,19 +632,15 @@ void Spatial::scale_object_local(const Vector3 &p_scale) { void Spatial::global_rotate(const Vector3 &p_axis, float p_angle) { - Basis rotation(p_axis, p_angle); Transform t = get_global_transform(); - t.basis = rotation * t.basis; + t.basis.rotate(p_axis, p_angle); set_global_transform(t); } void Spatial::global_scale(const Vector3 &p_scale) { - Basis s; - s.set_scale(p_scale); - Transform t = get_global_transform(); - t.basis = s * t.basis; + t.basis.scale(p_scale); set_global_transform(t); } |