Description

Attempting to set the collision of a component to NoCollision while the actor's collision is disabled will prevent the component's collision from changing. This is because of the early exit in UPrimitiveComponent::SetCollisionEnabled calling BodyInstance.GetCollisionEnabled() which defaults to checking the owner(actor)'s collision. This can be fixed by explicitly passing in false to BodyInstance.GetCollisionEnabled().

Steps to Reproduce

Place a static mesh actor.

On begin play set the mesh's collision to NoCollision. PIE.

On begin play set the mesh's collision to NoCollision, disable the actor's collision, re-enable the actor's collision. PIE.

Notice: In both cases the mesh's collision results in NoCollision.

On being play disable the actor's collision, set the mesh's collision to NoCollision, re-enable the actor's collision. PIE.

Notice: The child mesh's collision is not NoCollision.

 

Expected: Setting the mesh's collision shouldn't be effected by the actor's collision enablement.

 

Have Comments or More Details?

There's no existing public thread on this issue, so head over toAnswerHub just mention UE-83420 in the post.

1
Login to Vote

Unresolved
ComponentPhysics
Affects Versions4.234.24
Target Fix4.25
CreatedNov 8, 2019
UpdatedNov 23, 2019