mirror of
https://github.com/godotengine/godot.git
synced 2024-11-25 13:43:15 +00:00
Fix Quaternion Keyframe Optimization
This commit is contained in:
parent
9adb7c7d13
commit
9862056fa5
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user