Incorrect Scale on BodyInstance Capsules

FBodyInstance::UpdateBodyScale modifies the incoming scale using EScaleMode::LockedXY for capsules, to indicate that the capsule can only be non-uniformly scaled along the capsule’s major axis (Z, in the rest pose).

However, this does not take into account if the capsule shape is rotated relative to the body itself – e.g. if the capsule is rotated in PhAT relative to the body. This produces incorrect transformations.You can observe this by putting rotated capsules onto a skeletal mesh physics asset, and then playing an animation which scales along the shape’s major axis with the capsule visualization enabled. The capsule scales in weird ways.

We were able to correct this locally by rotating our joints in Maya to make sure the Z-axis is always pointed along capsule axes, but this workaround is tedious and not always possible.