Wake/Sleep events are not generated for components set to generate wake events after having a component not set to generate wake events welded to them. Wake/Sleep events are also not dispatched for welded children whose welded parent does not match its attached parent.
The current workaround is to add a check in FBodyInterface::Weld as:
if (TheirBody->bGenerateWakeEvents) { FPhysicsInterface::SetSendsSleepNotifies_AssumesLocked(Actor, true); }
And to modify the check in UPrimitiveComponent::DispatchWakeEvents as:
if (BI->WeldParent == RootBI || BI->WeldParent == RootBI->WeldParent)
{
PrimComp->DispatchWakeEvents(WakeEvent, BoneName);
}
This is a partial regression introduced in 4.21 from 4.20.
Create a BP from a static mesh actor, with an additional static mesh component as a child of the root, and place it in the level.
Set the root to simulate and generate wake events.
In the BP, change the component's material to be set based on the wake/sleep events.
PIE.
Notice that no wake/sleep events occur for the root.
Set the child component to generate wake events and PIE.
Notice that wake/sleep events now occur for the root.
Add an additional static mesh component as a child of the existing child. Set this grandchild component to also generate wake events and change material based on them. PIE.
Notice that no wake/sleep events occur for the grandchild.
Expected: Wake/Sleep events should still trigger regardless of welded children or hierarchy depth.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-85029 in the post.
4 |
Component | UE - Simulation - Physics |
---|---|
Affects Versions | 4.21, 4.22, 4.23, 4.24 |
Created | Nov 25, 2019 |
---|---|
Resolved | Aug 27, 2021 |
Updated | Aug 27, 2021 |