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().
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.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-83420 in the post.
1 |
Component | UE - Simulation - Physics |
---|---|
Affects Versions | 4.23, 4.24 |
Created | Nov 8, 2019 |
---|---|
Resolved | Aug 27, 2021 |
Updated | Aug 27, 2021 |
6392 - projectgheist |