# How to enable collision and physics on a Dynamic mesh?

**URL:** <https://forums.unrealengine.com/t/how-to-enable-collision-and-physics-on-a-dynamic-mesh/1499523>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, Blueprint, CPP, question\
**Created:** [December 6, 2023, 9:57pm UTC](https://forums.unrealengine.com/t/how-to-enable-collision-and-physics-on-a-dynamic-mesh/1499523 "2023-12-06T21:57:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Spectral\_99](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Spectral\_99](https://forums.unrealengine.com/u/Spectral_99)\
**Post date:** [December 6, 2023, 9:57pm UTC](https://forums.unrealengine.com/t/how-to-enable-collision-and-physics-on-a-dynamic-mesh/1499523/1 "2023-12-06T21:57:06Z")

</div>

I am working on a realtime fracture system using Dynamic mesh and UE fracturing: I’ve created an Actor (i.e. _DestructibleMesh_) with a root component set to _DestructibleMeshComponent_ (a component which extends _DynamicMeshComponent_).

To enable collision on this actor, as other posts suggest ([[1](https://forums.unrealengine.com/t/dynamic-mesh-collision/1276541)],[[2](https://forums.unrealengine.com/t/dynamic-mesh-and-collision-follow-up-questions-to-clarify-a-solved-problem/885835)]), I’ve used **ComplexAsSimple** as Collision type.

Here the DestructibleMesh constructor:

```auto
ADestructibleMesh::ADestructibleMesh(const FObjectInitializer& ObjectInitializer)
	: Super(ObjectInitializer)
{
	PrimaryActorTick.bCanEverTick = true;

	// TODO: needed?
	SetActorEnableCollision(true);
	
	DestructibleMeshComponent = CreateDefaultSubobject<UDestructibleMeshComponent>(TEXT("DestructibleMeshComponent"));
	DestructibleMeshComponent->SetMobility(EComponentMobility::Movable);
	DestructibleMeshComponent->SetGenerateOverlapEvents(false);
	// TODO: cannot simulate if using ComplexAsSimple
	DestructibleMeshComponent->SetSimulatePhysics(true);
	DestructibleMeshComponent->SetEnableGravity(true);
	DestructibleMeshComponent->bEnableComplexCollision = true;
	DestructibleMeshComponent->CollisionType = ECollisionTraceFlag::CTF_UseComplexAsSimple;
	DestructibleMeshComponent->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);

	DestructibleMeshComponent->OnComponentHit.AddDynamic(this, &ADestructibleMesh::OnComponentHit);

	SetRootComponent(DestructibleMeshComponent);
}

```

In this way, the collision works but I cannot simulate physics on this actor:

> [Note that if you are using **UseComplexAsSimple** you cannot simulate the object](https://docs.unrealengine.com/5.3/en-US/simple-versus-complex-collision-in-unreal-engine/)

In fact a warning in the log says:

> Trying to simulate physics on ‘DestructibleMeshComponent’’ but it has ComplexAsSimple collision.

Are there any workarounds that let me enable both collision and physics simulation on a dynamic mesh?

---

<div class="post-metadata">

**Author:** ![GloatingDevil](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/gloatingdevil/32/908576_2.png) [@GloatingDevil](https://forums.unrealengine.com/u/GloatingDevil)\
**Post date:** [March 11, 2024, 2:35pm UTC](https://forums.unrealengine.com/t/how-to-enable-collision-and-physics-on-a-dynamic-mesh/1499523/2 "2024-03-11T14:35:04Z")

</div>

Did you solved the issue ?
