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 to Questions & Answers just mention UE-83420 in the post.

1
Login to Vote

Won't Fix
ComponentUE - Simulation - Physics
Affects Versions4.234.24
CreatedNov 8, 2019
ResolvedAug 27, 2021
UpdatedAug 27, 2021
View Jira Issue