summaryrefslogtreecommitdiffstats
path: root/core/math/transform.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 /core/math/transform.cpp
parenteab105310b6722684d48bc0fe944fccc9392a26d (diff)
parent1bba6eeeb9f0898308e5b96f6f996c2fbabe55ee (diff)
downloadredot-engine-5c8919aac6877f49f8a113557b2e87422eda72c9.tar.gz
Merge pull request #18955 from tagcup/fix_set_scale
Removed incorrect Basis::set_scale().
Diffstat (limited to 'core/math/transform.cpp')
-rw-r--r--core/math/transform.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/core/math/transform.cpp b/core/math/transform.cpp
index d1e190f4b9..976e0f174e 100644
--- a/core/math/transform.cpp
+++ b/core/math/transform.cpp
@@ -127,12 +127,11 @@ Transform Transform::interpolate_with(const Transform &p_transform, real_t p_c)
Quat dst_rot = p_transform.basis.get_rotation_quat();
Vector3 dst_loc = p_transform.origin;
- Transform dst; //this could be made faster by using a single function in Basis..
- dst.basis = src_rot.slerp(dst_rot, p_c).normalized();
- dst.basis.set_scale(src_scale.linear_interpolate(dst_scale, p_c));
- dst.origin = src_loc.linear_interpolate(dst_loc, p_c);
+ Transform interp;
+ interp.basis.set_quat_scale(src_rot.slerp(dst_rot, p_c).normalized(), src_scale.linear_interpolate(dst_scale, p_c));
+ interp.origin = src_loc.linear_interpolate(dst_loc, p_c);
- return dst;
+ return interp;
}
void Transform::scale(const Vector3 &p_scale) {