diff options
author | Dheatly23 <71598333+Dheatly23@users.noreply.github.com> | 2024-02-01 15:39:31 +0700 |
---|---|---|
committer | Dheatly23 <71598333+Dheatly23@users.noreply.github.com> | 2024-02-03 16:16:21 +0700 |
commit | 9862056fa586b11a2555d666c11ae7e14bdde9f3 (patch) | |
tree | e7edced841d8fc86e637bd7347e426c961b798b8 /scene/resources/animation.cpp | |
parent | 9adb7c7d130c6d4eb0e80b92d6eebd71fac3384d (diff) | |
download | redot-engine-9862056fa586b11a2555d666c11ae7e14bdde9f3.tar.gz |
Fix Quaternion Keyframe Optimization
Diffstat (limited to 'scene/resources/animation.cpp')
-rw-r--r-- | scene/resources/animation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index 6532a15114..b7d4962b57 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -4016,7 +4016,7 @@ bool Animation::_quaternion_track_optimize_key(const TKey<Quaternion> t0, const if (q0.get_axis().dot(q1.get_axis()) >= 1.0 - p_allowed_angular_error * 2.0) { double a0 = Math::acos(t0.value.dot(t1.value)); double a1 = Math::acos(t1.value.dot(t2.value)); - if (a0 + a1 >= Math_PI) { + if (a0 + a1 >= Math_PI / 2) { return false; // Rotation is more than 180 deg, keep key. } // Calc velocities. |