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:
parent
e7445c3d82
commit
a5e0bb447c
8 changed files with 85 additions and 18 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue