Keeping characters within Fighting area

Howdy,

So have a bit of a custom / strange setup here.

  1. I have an arena that 2 characters are fighting wtihin. I have box colliders setup all around the arena to theoretically keep the characters contained wtihin. The box colliders are simple, static nothing fancy.

  2. characters are moved around via standard character controller component with root motion-based animations (via mecanim) being used as well. I do have ragdoll rigid body hierarchy setup on the characters, but that doesn’t actually do ‘anything’ while mecanim is active…

All works perfectly fine, UNTIL I run into situations where the root motion animation projects the character(s) through the collision areas of the outer ring.

For example, we have a body slam or throw - the target (thrown) character might end up overlapping or outside of the ring after the root motion animation completes. Mecanim adjusts / resets the base transform / character controller fine to the characters new ‘end position’, but the collision / physics system doesn’t seem to do ANYTHING about the resulting overlapped collision objects.

I expected that the physics system would ‘correct’ itself and at least attempt to keep the charactercontroller object so that it doesn’t overlap with the main arena box colliders, but nothing seems to happen.

Any ideas?

Just ended up keeping a min/max bounds and checking the player’s position. if it exceeds the min/max, then I slerp them back into position.

very annoying, still not sure why the collision system doesn’t work in this scenario.