1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Removed incorrect Basis::set_scale().

Also added a missing constructor in Basis, and fixed usage of inverse and affine inverse in Transform.
This commit is contained in:
tagcup
2018-05-16 20:32:35 -04:00
parent ba134d44b8
commit 1bba6eeeb9
4 changed files with 11 additions and 21 deletions

View File

@@ -127,12 +127,11 @@ Transform Transform::interpolate_with(const Transform &p_transform, real_t p_c)
Quat dst_rot = p_transform.basis;
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) {