I have an object containing a `Rigidbody`, a `CapsuleCollider` and a number of children each with their own collider. The object's rigidbody is set to "Freeze Rotation" and motion is restricted to the XY axis by calling `rb.position = new Vector3(rb.position.x, rb.position.y, 0)` each update.
The problem is the main object's collider isn't stopped by some obstacles unless I first remove the childrens' colliders or change the rigidbody's center of mass via scripting: When the center of mass is high, colliders on top work OK but those at the bottom do not. When the center of mass is low, colliders at the bottom work OK but those on top do not. All the values I've tried so far lead to some of the colliders partially or completely penetrating the obstacles.
I don't see why the center of mass should affect collisions for objects where Freeze Rotation is set to true. Is there any way to prevent this from happening with Unity's built-in physics or do I have no choice but to write my own physics routines?