summaryrefslogtreecommitdiff
path: root/scene/3d/spatial.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-07-26 10:37:03 +0200
committerGitHub <noreply@github.com>2018-07-26 10:37:03 +0200
commit5c8919aac6877f49f8a113557b2e87422eda72c9 (patch)
treec9c4a172091f48e22fbd931a86cd1139d9a19611 /scene/3d/spatial.cpp
parenteab105310b6722684d48bc0fe944fccc9392a26d (diff)
parent1bba6eeeb9f0898308e5b96f6f996c2fbabe55ee (diff)
Merge pull request #18955 from tagcup/fix_set_scale
Removed incorrect Basis::set_scale().
Diffstat (limited to 'scene/3d/spatial.cpp')
-rw-r--r--scene/3d/spatial.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp
index 9b27faed6a..64cb9ec4ca 100644
--- a/scene/3d/spatial.cpp
+++ b/scene/3d/spatial.cpp
@@ -645,19 +645,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);
}