When using a Destructible that is using the Event OnComponentFracture and the flags for Debris timeout/max separation and Debris Enabled will cause the event to fire for each chunk removed from the scene, in addition to a fire for the base mesh.
As a workaround, setting a do once node and letting the even only fire once will negate this issue.
Sample Project included.
1. Create DM
2. Fracture the DM and Set the flags checked for Debris Timeout with Debris Enabled
3. Create a BP using the layout in image "DM_OnComponentFractured"
4. Place in the level
5. PIE/Simulate
6. Destroy the DM
If using the Sample project:
1. Open DM_EventOnFracture project
2. PIE
3. Press 1 to see the multiple event fires issue.
4. Press 2 to see workaround using Do Once node
Results: The OnComponentFracture will fire once for each chunk mesh removed. So for instance, if the DM's depth 1 only has 2 chunks, the event will fire 3 times. Once for the base mesh, and twice for the two chunks for a total of three times. This only happens when the flags for Debris is enabled with Debris timeout/max separation.
Expected: The OnComponentFracture will fire only once when using the debris flags enabled and chunks are removed from the scene.
Head over to the existing Questions & Answers thread and let us know what's up.
0 |
Component | UE - Simulation - Physics - Destruction |
---|---|
Affects Versions | 4.8, 4.9, 4.14 |
Created | Jul 15, 2015 |
---|---|
Resolved | Aug 18, 2021 |
Updated | Aug 18, 2021 |