mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Merge pull request #64678 from TokageItLab/implement-ease-baker
Fix Quaternion Tween and add Easing baker to AnimationTrackEditor
This commit is contained in:
@@ -112,10 +112,11 @@ Quaternion Quaternion::exp() const {
|
||||
Quaternion src = *this;
|
||||
Vector3 src_v = Vector3(src.x, src.y, src.z);
|
||||
real_t theta = src_v.length();
|
||||
if (theta < CMP_EPSILON) {
|
||||
src_v = src_v.normalized();
|
||||
if (theta < CMP_EPSILON || !src_v.is_normalized()) {
|
||||
return Quaternion(0, 0, 0, 1);
|
||||
}
|
||||
return Quaternion(src_v.normalized(), theta);
|
||||
return Quaternion(src_v, theta);
|
||||
}
|
||||
|
||||
Quaternion Quaternion::slerp(const Quaternion &p_to, const real_t &p_weight) const {
|
||||
|
||||
Reference in New Issue
Block a user