Hello,
We have been experiencing excessive logspam due to the BodyInstance validation on line 910 of PrimitiveComponent.cpp
The if statement below implies that if collision is disabled (i.e set to NoCollision) then this validation will be skipped.
#if !(UE_BUILD_SHIPPING || UE_BUILD_TEST)
if ((BodyInstance.GetCollisionEnabled() != ECollisionEnabled::NoCollision) && (FMath::IsNearlyZero(BodyScale.X) || FMath::IsNearlyZero(BodyScale.Y) || FMath::IsNearlyZero(BodyScale.Z)))
{
UE_LOG(LogPhysics, Warning, TEXT("Scale for %s has a component set to zero, which will result in a bad body instance. Scale:%s"), *GetPathNameSafe(this), *BodyScale.ToString());
// User warning has been output - fix up the scale to be valid for physics
BodyTransform.SetScale3D(FVector(
FMath::IsNearlyZero(BodyScale.X) ? UE_KINDA_SMALL_NUMBER : BodyScale.X,
FMath::IsNearlyZero(BodyScale.Y) ? UE_KINDA_SMALL_NUMBER : BodyScale.Y,
FMath::IsNearlyZero(BodyScale.Z) ? UE_KINDA_SMALL_NUMBER : BodyScale.Z
));
}
#endif
However this validation generates a warning even if the static mesh component on the actor is set to NoCollision.
The validation will always generate a warning if the blueprint asset has collision is enabled, regardless of whether the actor component placed in world has collision disabled.
It seems like the validation is executing before the BodyInstance/BodySetup for the component has been fully initialized, and so it’s falling back to the class default.
If so, is this a bug? Please let us know.
Thanks,
-Amiko ![]()
[Attachment Removed]