Align navmesh agent (AI) with terrain - Nothing is working!


I have spent days researching and trying to smoothly align the enemy that uses navmesh agent (no rigid body) with the ground, but nothing seems to be working. I have tried many scripts and maybe it’s because of the hills that I have in my game and the AI moves really fast especially when running and there are “snapping” glitches rotating left / right really quick. At this point I am desperate to find a solution, the enemy is just floating while going downhills and while climbing a hill it’s front legs are going in the ground.

I have also built a height mesh with the navmesh system. I will be thankful for any suggestions.

Make your enemy a child of the navmesh agent. Then manually control the rotation of the character thats a child of the navmesh agent.