diff --git a/direct/src/interval/cLerpNodePathInterval.I b/direct/src/interval/cLerpNodePathInterval.I index 03c90753cb..5d4337f9df 100644 --- a/direct/src/interval/cLerpNodePathInterval.I +++ b/direct/src/interval/cLerpNodePathInterval.I @@ -106,6 +106,8 @@ set_end_hpr(const LQuaternion &quat) { * if either set_end_quat() or set_end_hpr() is also called. This parameter * is optional; if unspecified, the value will be taken from the node's actual * rotation at the time the lerp is performed. + * + * The given quaternion needs to be normalized. */ INLINE void CLerpNodePathInterval:: set_start_quat(const LQuaternion &quat) { @@ -143,6 +145,8 @@ set_end_quat(const LVecBase3 &hpr) { * This replaces a previous call to set_end_hpr(). If neither set_end_quat() * nor set_end_hpr() is called, the node's rotation will not be affected by * the lerp. + * + * The given quaternion needs to be normalized. */ INLINE void CLerpNodePathInterval:: set_end_quat(const LQuaternion &quat) { diff --git a/direct/src/interval/cLerpNodePathInterval.cxx b/direct/src/interval/cLerpNodePathInterval.cxx index 2fbc8a7e75..97babae49e 100644 --- a/direct/src/interval/cLerpNodePathInterval.cxx +++ b/direct/src/interval/cLerpNodePathInterval.cxx @@ -174,14 +174,14 @@ priv_step(double t) { setup_slerp(); } else if ((_flags & F_bake_in_start) != 0) { - set_start_quat(transform->get_quat()); + set_start_quat(transform->get_norm_quat()); setup_slerp(); } else { if (_prev_d == 1.0) { _start_quat = _end_quat; } else { - LQuaternion prev_value = transform->get_quat(); + LQuaternion prev_value = transform->get_norm_quat(); _start_quat = (prev_value - _prev_d * _end_quat) / (1.0 - _prev_d); } setup_slerp(); diff --git a/doc/ReleaseNotes b/doc/ReleaseNotes index 181b1eedab..ba67ff8dc8 100644 --- a/doc/ReleaseNotes +++ b/doc/ReleaseNotes @@ -14,6 +14,7 @@ This is a bugfix release intended to fix several issues in 1.10.0. * Depth buffer now defaults to 24-bit on macOS (fixes flickering) * Fix no devices being detected on Windows with threading-model * Implement collision tests from Capsule and Box into InvSphere +* Fix odd behavior and occasional crash in QuatInterval * Fix SpriteAnim error in particle system * Fix ShaderGenerator error when using too many shadowing lights * Fix interrogate crash in Python 3 with optional wstring args