Python: Eneble UseComplexAsSimple collision for static mesh?

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

287483-untitled.png

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)
1 Like