Skip to content

Commit

Permalink
Merge pull request #79426 from sepTN/fix-basis-tweening
Browse files Browse the repository at this point in the history
Fix `tween_property` on "Basis" to properly update its value
  • Loading branch information
YuriSizov committed Jul 14, 2023
2 parents ac16c26 + eb7f87e commit 16565fb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scene/resources/animation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down Expand Up @@ -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());
}
Expand Down

0 comments on commit 16565fb

Please sign in to comment.