diff options
author | Septian <septgsk@gmail.com> | 2023-07-13 23:07:23 +0700 |
---|---|---|
committer | Septian <septgsk@gmail.com> | 2023-07-13 23:07:23 +0700 |
commit | eb7f87e9a87f37fb39c8437f3fa689f5d7b9d770 (patch) | |
tree | e88ff257fc13213f7ed4c12189974ed89dd0bbe4 /scene/resources/animation.cpp | |
parent | 60f3b7967cbd00b4e1f52d33d372646f7bec02f6 (diff) | |
download | redot-engine-eb7f87e9a87f37fb39c8437f3fa689f5d7b9d770.tar.gz |
Fix `tween_property` on "Basis" to properly update its value
Diffstat (limited to 'scene/resources/animation.cpp')
-rw-r--r-- | scene/resources/animation.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/resources/animation.cpp b/scene/resources/animation.cpp index 1ab6e714a8..7c0db810be 100644 --- a/scene/resources/animation.cpp +++ b/scene/resources/animation.cpp @@ -5508,6 +5508,9 @@ Variant Animation::add_variant(const Variant &a, const Variant &b) { const ::AABB ab = b.operator ::AABB(); return ::AABB(aa.position + ab.position, aa.size + ab.size); } + case Variant::BASIS: { + return (a.operator Basis()) * (b.operator Basis()); + } case Variant::QUATERNION: { return (a.operator Quaternion()) * (b.operator Quaternion()); } @@ -5555,6 +5558,9 @@ Variant Animation::subtract_variant(const Variant &a, const Variant &b) { const ::AABB ab = b.operator ::AABB(); return ::AABB(aa.position - ab.position, aa.size - ab.size); } + case Variant::BASIS: { + return (b.operator Basis()).inverse() * (a.operator Basis()); + } case Variant::QUATERNION: { return (b.operator Quaternion()).inverse() * (a.operator Quaternion()); } |