How i can disable specific body collision in physics asset on runtime?
Hello everyone! How i can disable specific body collision in physics asset on runtime? For example, i need disable arm or leg collision in Mannequin. I try use GetPhysicsAsset()->DisableCollision but it not work.
asked Jan 31 '19 at 12:55 PM in C++ Programming
ok, I found the answer!
HideBoneByName() does actually work as intended. I tested it on my project and confirmed with C++ implementation. HideBoneByName is implemented in USkinnedMeshComponent and inside it calls HideBone(). HideBone() is overridden in USkeletalMeshComponent and it does account for EPhysBodyOp option and it effectively terminates all collisions for this bone and its children by calling TermBodiesBelow(). The only things is that collision bodies are still visible in debug (that what was confusing me, and I thought that collisions are still there). So what is needed to use for PhysBodyOption is "PBO_Term" to disable collisions.
If you do not want to hide a bone but just disable a collision, I would imagine you just need to call TermBodiesBelow()
Follow this question
Once you sign in you will be able to subscribe for any updates here