diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-08-23 09:19:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-23 09:19:21 +0200 |
commit | b9919fd87dbac180f2d3ade766a8d074d4224dfe (patch) | |
tree | 2fa6d1397ea2b7539097b305bf178d3d7d41cfa1 /scene/animation/tween.cpp | |
parent | 3f3ade9e5b19e8d13169a9af45a80877b3fa1c65 (diff) | |
parent | f7dd83ce604494550b03a7b3ff09d5e458f01950 (diff) |
Merge pull request #64678 from TokageItLab/implement-ease-baker
Fix Quaternion Tween and add Easing baker to AnimationTrackEditor
Diffstat (limited to 'scene/animation/tween.cpp')
-rw-r--r-- | scene/animation/tween.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/scene/animation/tween.cpp b/scene/animation/tween.cpp index dbc71cd9e7..7d9f83b7a2 100644 --- a/scene/animation/tween.cpp +++ b/scene/animation/tween.cpp @@ -479,12 +479,8 @@ Variant Tween::interpolate_variant(Variant p_initial_val, Variant p_delta_val, f case Variant::QUATERNION: { Quaternion i = p_initial_val; Quaternion d = p_delta_val; - Quaternion r; - - APPLY_EQUATION(x); - APPLY_EQUATION(y); - APPLY_EQUATION(z); - APPLY_EQUATION(w); + Quaternion r = i * d; + r = i.slerp(r, run_equation(p_trans, p_ease, p_time, 0.0, 1.0, p_duration)); return r; } |