1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-23 15:16:17 +00:00

Avoid converting Quat to Euler angles when not necessary.

Also ensure that get_scale doesn't arbitrarlity change the signs of scales, ensuring that the combination of get_rotation and get_scale gives the correct basis.

Added various missing functions and constructors.

Should close #17968.
This commit is contained in:
tagcup
2018-04-14 15:53:25 -04:00
parent e7445c3d82
commit a5e0bb447c
8 changed files with 85 additions and 18 deletions

View File

@@ -119,11 +119,11 @@ Transform Transform::interpolate_with(const Transform &p_transform, real_t p_c)
/* not sure if very "efficient" but good enough? */
Vector3 src_scale = basis.get_signed_scale();
Vector3 src_scale = basis.get_scale();
Quat src_rot = basis.orthonormalized();
Vector3 src_loc = origin;
Vector3 dst_scale = p_transform.basis.get_signed_scale();
Vector3 dst_scale = p_transform.basis.get_scale();
Quat dst_rot = p_transform.basis;
Vector3 dst_loc = p_transform.origin;