Download

Howto set bDebrisTimeout on DestructibleMesh?

Hi there,

In the Destructible editor, there are some timeout fields for chunks. I want the chunks forever, so while setting them to 999999, I noticed a bDebrisTimeout flag in the tooltip and documentation.

When I set this flag = false (or 0), it crashes the editor. Which is a bummer. What is the way to set bDebrisTimeout?

ASplodyMesh::ASplodyMesh()
{
PrimaryActorTick.bCanEverTick = true;

Root = CreateDefaultSubobject<USceneComponent>(TEXT("Root"));
SetRootComponent(Root);

Destructible = CreateDefaultSubobject<UDestructibleComponent>(TEXT("Destructible"));
// Don't destroy chunks via timeout.
Destructible->GetDestructibleMesh()->DefaultDestructibleParameters.Flags.bDebrisTimeout = 0;  // BOOM!  same for true
Destructible->SetupAttachment(GetRootComponent());

}

Thank you!

https://docs.unrealengine.com/en-US/API/Plugins/ApexDestruction/FDestructibleParametersFlag/index.html
https://docs.unrealengine.com/en-US/API/Plugins/ApexDestruction/FDestructibleParameters/index.html
https://docs.unrealengine.com/en-US/API/Plugins/ApexDestruction/UDestructibleMesh/index.html

I fixed this by moving it to BeginPlay()