The goal is to set Static Mesh Collision Preset as “Complex as Simple”
StaticMeshAsset->BodySetup->CollisionTraceFlag = ECollisionTraceFlag::CTF_UseComplexAsSimple;
It changes Collision Preset value. But not a Collision.
What am I missing?
You can’t change it on the asset - you would have to change the flag on the static mesh component instance that is in the world, however many of them there are that use that mesh. Assets can’t be modified at runtime.
Thanks for the reply, TheJamsh.
I was looking, how to modify assets in the editor, not at runtime. Sorry, didn’t write that in the first post.
However, for me it worked, when I added
It worked, but I don’t know if I can use it.
you could use the project settings, Default Shape Complexity
In UE5 you need:
StaticMeshAsset->GetBodySetup()->CollisionTraceFlag = ECollisionTraceFlag::CTF_UseComplexAsSimple;