SetMaterial for DestructibleComponent

Hello,

I’m destroying my component and want to assign material for the debris. I’m assigning it every frame (change some material parameter). If I start to assign my material immediately after I destroyed a component - everything works fine. If I assign a material after some delay - I always have an exception. The chain is following:

// MyActor.cpp
Destructible->SetMaterial(0, MyMaterial);

// MeshComponent.cpp
SetMaterial();

// BodyInstance.cpp
UpdatePhysicalMaterials();

And it falls in the beginning of a function - RigidActorSync->getScene() returns garbage.

Hi ,

I apologize for not responding to your post sooner. Are you still experiencing problems with this issue?

Hi ,
I found some workaround (don’t remember which one) that looks a bit hacky. But it works.