Apropos of nothing, this is the code to get the mass (the built-in mass gets the welded body mass):
UFUNCTION(BlueprintPure)
static float GetPrimitiveMass(UPrimitiveComponent* InComponent)
{
if (InComponent)
{
// unlike the official function, get the unwelded body instance
if (const auto* BodyInstance = InComponent->GetBodyInstance(NAME_None, false))
{
return BodyInstance->bOverrideMass ? BodyInstance->GetMassOverride() : BodyInstance->GetBodyMass();
}
}
return 0.0f;
}