I have a problem with the physics bodies in the physics asset of my character not properly colliding. My character has a number of physics bodies that are set to simulating (hair and some ornaments), whereas the rest is set to default (though, I have tried it with kinematic, and the result is the same). The character’s hair especially needs to have physics applied to it, but the hair cannot pass through the body.
In the PHAT tool, my setup works; when I simulate the physics, the physics bodies act as intended. However, in-game the physics bodies ignore all collisions from other physics bodies leading the hair of my character to pass through the character entirely.
I have already tried setting the CCD bool for the physics bodies in question, I have set up their collision response, I have tried selecting the hair boxes together with the boxes I want to have collision with and pressed the Collision On button, but absolutely nothing is working.
How do I solve this, because I have no idea what I am doing wrong here?
I think you should check the collision of your character, maybe you use the ACharacter, and it set enable collision for the capsule and disable collision for the mesh, so the physic asset won’t effect.
Or, if you use another skeletal mesh, using the SetMasterPoseComponent function to aim the master pose, you should enable the collision for you master mesh, maybe set Collision as PhysicsActor or any other.
If that didn’t work, you can try calling RecreatePhysicsState for you master mesh. If your project is blueprint only, you can call SetMasterPoseComponent function for the master mesh instead, and give empty for the parameter of new pose. But I’m not sure if it will make any other trouble by calling SetMasterPoseComponent.
I’m not native English speaker, I hope you can know what I wrote
Even when enabling collision for the mesh, I still have the same problem. To make matters worse, if I enable collision on the mesh as well, interaction with physics objects is completely random (character being launched off the physics object, physics object being launched away from the character, etcetera) so that’s not an option for me since parts of my game rely on physics. I will look into the RecreatePhysicsState.