# How to set "Use complex collisions as simple" in CODE?

**URL:** <https://forums.unrealengine.com/t/how-to-set-use-complex-collisions-as-simple-in-code/340241>\
**Category:** C++\
**Tags:** unreal-engine, question, CPP\
**Created:** [December 1, 2015, 7:07pm UTC](https://forums.unrealengine.com/t/how-to-set-use-complex-collisions-as-simple-in-code/340241 "2015-12-01T19:07:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dokdan85](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dokdan85](https://forums.unrealengine.com/u/dokdan85)\
**Post date:** [December 1, 2015, 7:07pm UTC](https://forums.unrealengine.com/t/how-to-set-use-complex-collisions-as-simple-in-code/340241/1 "2015-12-01T19:07:15Z")

</div>

Hello everyone,  
I’m writing a method which allows to manipulate assets. (in editor, not in game)  
Straggling to find a way to set “Use complex collisions as simple” on a static mesh asset in code.  
Any suggestions?  
Thanks

---

<div class="post-metadata">

**Author:** ![Sean\_Flint](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Sean\_Flint](https://forums.unrealengine.com/u/Sean_Flint)\
**Post date:** [December 2, 2015, 8:46pm UTC](https://forums.unrealengine.com/t/how-to-set-use-complex-collisions-as-simple-in-code/340241/2 "2015-12-02T20:46:51Z")

</div>

Hello,

After investigating the issue, it seems that this property can only be accessed using the Static Mesh Editor that is available in the Editor itself. This does not seem to be a property that is editable through code.

Have a great day,

Sean Flint

---

<div class="post-metadata">

**Author:** ![LUKASZJB](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@LUKASZJB](https://forums.unrealengine.com/u/LUKASZJB)\
**Post date:** [December 22, 2016, 1:42pm UTC](https://forums.unrealengine.com/t/how-to-set-use-complex-collisions-as-simple-in-code/340241/3 "2016-12-22T13:42:12Z")

</div>

```

Component->GetBodySetup()->CollisionTraceFlag = ECollisionTraceFlag::CTF_UseSimpleAsComplex;

```

It is possible from code:)

Remember to include “PhysicsEngine/BodySetup.h”
