Ignored colliders still interfere with physics simulation.
I'm working on a physics-based FPS. Today i added some more colliders for my character, i have set them to ignore eachother in the layer collision matrix. But they are still interfering with the physics. I made a video that shows how the recoil when shooting is way different with colliders enabled than when they are disabled. My character also have big problems balancing with the colliders enabled.
Video: https://www.youtube.com/watch?v=jtX006iaA7E&feature=youtu.be
Do anyone know why this would happen? If you have any solution to this i would be very grateful.
Do the colliders have a physics material? With, say, drag? Does the bug still happen if each colliders are in a different layer? Or simply a layer with no internal collisions?
The way i had it set up was using a layer without internal collisions. I was not using any physics materials, i tried to apply one without any friction or bounciness without any luck. I have now noticed that the problem does not seem to stem from any interaction with other colliders as i disabled all colliders but one and the problem still persists. $$anonymous$$y upper arm collider seem to cause the most problems. I also tried using box colliders ins$$anonymous$$d of capsules, also this did not work. Using them as triggers got rid of the problem, but the whole point of the colliders are to collide with stuff, so that does not help me to much.
Colliders might also affect the rigidbody center of mass (if they are not triggers). You can fix it by setting the center of mass yourself.
Answer by HanYol0 · Dec 03, 2019 at 06:52 PM
I have finally found the issue! After some googling i found a forum thread from 2012. https://forum.unity.com/threads/collider-affects-hinge-joint.156502/ In addition to changing the center of mass as @ceandros said, the collider also changes the rigidbodys inertiaTensor, setting this to vector3.one solved my problem.
Your answer
Follow this Question
Related Questions
Recreating 'skin width' functionality on a rigidbody? 0 Answers
How to Ignore Collisions Between a Layer and a LayerMask? 1 Answer
Rigidbody randomly going through collider 1 Answer
Why is my trigger collider acting like a normal collider? 1 Answer
Physics.OverlapSphere not detecting collision! Collision help. 1 Answer