summaryrefslogtreecommitdiff
path: root/scene/animation
diff options
context:
space:
mode:
authorSilc Renew <tokage.it.lab@gmail.com>2022-08-21 09:30:18 +0900
committerSilc Renew <tokage.it.lab@gmail.com>2022-08-22 19:04:58 +0900
commitf7dd83ce604494550b03a7b3ff09d5e458f01950 (patch)
tree42ba1a4642a7558de052eb2957d277b37f3e87b3 /scene/animation
parent0c5f254956f0115e363ce08045dd178dc30b54f8 (diff)
Fix Quaternion Tween and implement ease baker
Diffstat (limited to 'scene/animation')
-rw-r--r--scene/animation/tween.cpp8
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;
}