[Solved] Mecanim & collision issue w/ RichAI

I’m in the process of migrating off Unity Navmesh agent over to RichAI w/ Recast Graph. I’ve hit a situation with animation collisions that were handled by Unity Navmesh Agents that I’m not sure how best to handle with RichAI.

The problem is that an animation plays (hit animation which propels the model backwards (say 1.5f) for example via root motion). With Unity Navmesh Agents, if the animated character hits a wall, the character won’t go through the wall. With RichAI agents, the animated character will go through the wall.

I’ve tried adding a collider, but that didn’t work. I tried adding a collider w/ rigidbody, that didn’t work. The only thing that “sort of” works is adding a character controller, but when doing so it seems to push the character additional distance for whatever reason.

I’m sure I’m not the only person to encounter this with RichAI or migrating from Navmesh Agents, so I would imagine there’s something I’m missing.

(Note that my controller & animations work correctly with Unity Navmesh agents, nothing is done via code to the Unity nav mesh agent to make it aware it’s hitting a wall or adjusting its position, physics, etc)

Solution - Add the Unity Character Controller component, even if you don’t use it through code, just having it on the gameobject/character will prevent it from moving through a wall during a root motion animation with body colliders.