mirror of
https://github.com/godotengine/godot.git
synced 2024-11-29 07:32:20 +00:00
Merge pull request #79279 from kleonc/animation-fix-transform-subtracting
Fix `Animation::subtract_variant` for affine transforms
This commit is contained in:
commit
de14f09c1d
@ -5559,10 +5559,10 @@ Variant Animation::subtract_variant(const Variant &a, const Variant &b) {
|
||||
return (b.operator Quaternion()).inverse() * (a.operator Quaternion());
|
||||
}
|
||||
case Variant::TRANSFORM2D: {
|
||||
return (b.operator Transform2D()).inverse() * (a.operator Transform2D());
|
||||
return (b.operator Transform2D()).affine_inverse() * (a.operator Transform2D());
|
||||
}
|
||||
case Variant::TRANSFORM3D: {
|
||||
return (b.operator Transform3D()).inverse() * (a.operator Transform3D());
|
||||
return (b.operator Transform3D()).affine_inverse() * (a.operator Transform3D());
|
||||
}
|
||||
default: {
|
||||
return Variant::evaluate(Variant::OP_SUBTRACT, a, b);
|
||||
|
Loading…
Reference in New Issue
Block a user