# Python: Eneble UseComplexAsSimple collision for static mesh?

**URL:** <https://forums.unrealengine.com/t/python-eneble-usecomplexassimple-collision-for-static-mesh/455415>\
**Category:** Editor Scripting\
**Tags:** Python, unreal-engine, Collision, question\
**Created:** [September 16, 2019, 11:30am UTC](https://forums.unrealengine.com/t/python-eneble-usecomplexassimple-collision-for-static-mesh/455415 "2019-09-16T11:30:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![YanDaik](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@YanDaik](https://forums.unrealengine.com/u/YanDaik)\
**Post date:** [September 16, 2019, 11:30am UTC](https://forums.unrealengine.com/t/python-eneble-usecomplexassimple-collision-for-static-mesh/455415/1 "2019-09-16T11:30:19Z")

</div>

Is it possible with python script enable UseComplexAsSimple for mesh? I cant find it in references.

![287483-untitled.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/2/6/726d2b19222a2f654cdfff3e51d8f06790779f61.png)

---

<div class="post-metadata">

**Author:** ![M.Janssens](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@M.Janssens](https://forums.unrealengine.com/u/M.Janssens)\
**Post date:** [October 21, 2019, 1:56pm UTC](https://forums.unrealengine.com/t/python-eneble-usecomplexassimple-collision-for-static-mesh/455415/2 "2019-10-21T13:56:03Z")

</div>

You need set the **collision\_trace\_flag** in the **body\_setup** of an unreal.StaticMesh. I didn’t test the code, but it should work.

```
static_mesh = unreal.EditorAssetLibrary.load_asset('/Game/Meshes/MyMesh.MyMesh')
body_setup = static_mesh.get_editor_property('body_setup')
collision_trace_flag = unreal.CollisionTraceFlag.CTF_USE_COMPLEX_AS_SIMPLE
body_setup.set_editor_property('collision_trace_flag', collision_trace_flag)
static_mesh .set_editor_property('body_setup', body_setup)
```
