Hi, all,
I hope to make a part of a Chaos Destruction Fractured actor that has already shattered disappear. This is in the my customized code of Geometry Collision, but it has not been successful. If anyone can give me some advice, I would be very grateful.
void UGeometryCollectionComponent::SetDebrisVisibility(int32 itemIndex, bool visibility)
{
TArray<int32> itemIndices;
itemIndices.Add(itemIndex);
// Remove the identified pieces
//DynamicCollection->RemoveElements("Transform", itemIndices);
DynamicCollection->Active[itemIndex] = visibility;
//DynamicCollection->DynamicState[itemIndex] = visibility;
DynamicCollection->SimulatableParticles[itemIndex] = visibility;
DynamicCollection->MakeDirty();
MarkRenderStateDirty();
MarkRenderDynamicDataDirty();
SetRenderStateDirty();
}