Fix tween_property
on "Basis" to properly update its value
This commit is contained in:
parent
60f3b7967c
commit
eb7f87e9a8
1 changed files with 6 additions and 0 deletions
|
@ -5508,6 +5508,9 @@ Variant Animation::add_variant(const Variant &a, const Variant &b) {
|
||||||
const ::AABB ab = b.operator ::AABB();
|
const ::AABB ab = b.operator ::AABB();
|
||||||
return ::AABB(aa.position + ab.position, aa.size + ab.size);
|
return ::AABB(aa.position + ab.position, aa.size + ab.size);
|
||||||
}
|
}
|
||||||
|
case Variant::BASIS: {
|
||||||
|
return (a.operator Basis()) * (b.operator Basis());
|
||||||
|
}
|
||||||
case Variant::QUATERNION: {
|
case Variant::QUATERNION: {
|
||||||
return (a.operator Quaternion()) * (b.operator 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();
|
const ::AABB ab = b.operator ::AABB();
|
||||||
return ::AABB(aa.position - ab.position, aa.size - ab.size);
|
return ::AABB(aa.position - ab.position, aa.size - ab.size);
|
||||||
}
|
}
|
||||||
|
case Variant::BASIS: {
|
||||||
|
return (b.operator Basis()).inverse() * (a.operator Basis());
|
||||||
|
}
|
||||||
case Variant::QUATERNION: {
|
case Variant::QUATERNION: {
|
||||||
return (b.operator Quaternion()).inverse() * (a.operator Quaternion());
|
return (b.operator Quaternion()).inverse() * (a.operator Quaternion());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue