How to "remove" the locking of a Nav mesh agent over unbaked areas?.

Hello there.

I’m making a game about having to smash the enemies against obstacles, thing is I want them to not get very close to the obstacles (so it isn’t piece of cake for the player) but still being able to get smashed against them if the player push that enemy.
I tried a couple of things like increasing their obstacle avoidance radius or increasing the radius of the agent in the baking tab, but it seems that mesh agents have some kind of constraint for walking over unbaked areas, it is impossible to put them in there without disabling the whole nav mesh component…

I basically thought the easiest thing to do was to bake the map with a bigger radius, so the enemies don’t get close to obstacles and walls, but it is impossible to push them into unbaked areas…

Thanks btw.

You cannot move a NavMeshAgent onto unbaked area, that’s the whole idea of a NavMeshAgent. To do it, you need to disable the NavMeshAgent.

If I understand your game idea, I would on collision with the player attack disable the NavMeshAgent, move the enemy with physics or whatever you prefer, then destroy it if it died from the collision, or if it survived, animate it going back to the closest point on the baked area (i.e. the enemy is getting up), then enable the NavMeshAgent again.