From 1bba6eeeb9f0898308e5b96f6f996c2fbabe55ee Mon Sep 17 00:00:00 2001 From: tagcup Date: Wed, 16 May 2018 20:32:35 -0400 Subject: Removed incorrect Basis::set_scale(). Also added a missing constructor in Basis, and fixed usage of inverse and affine inverse in Transform. --- scene/3d/spatial.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'scene/3d/spatial.cpp') 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); } -- cgit v1.2.3