Player "teleports" on top of NavMeshAgent collider if the Agent is too close

hey guys,

I’m using the Unity NavMesh on Unity 5.0.1f1 and I have the problem that my player (which is controled by a PlayerController) teleports on top of a NavMeshAgent if the agent is too close to the player. I need the agent (my enemy) to be very close to the player, so the attack hits the player.

If the enemy stands still, the player can not walk on top of it. But if the player stands still and the enemy approch the player then the player is teleporteted on top of the enemy collider, regardless of its height. That happens also when the “Slope Limit” and “Step Offset” in the character controller is 0.

The enemy has a kinemetic rigidbody and a static boxcollider attached. The player has the playercontroller attached.

I’ve also attached a navmesh agent, for testing, to the player but then I can’t jump and run across areas that are marked as “not Walkable” for the enemys.

Do you know how to fix this problem?

I have not set up a test but perhaps try attaching a navmesh obstacle to the player character and/or the enemies. The obstacle prevents the agents to move to that location. I guess the agents now just wanna stick to the spot they were at without being pushed around. If the player has a navmesh obstacle component attached to itself, the enemy won’t be able to move to litterally the same spot but get close enough.


I had to remove the RigidBody of the ennemy and it doesnt teleport on top anymore and collision works.

I have the exact same issue, did you manage to fix it? The player is controlled with a CharacterController, I set the slope limit to 0 and the step offset to 0 too, but when it gets really close from a NavMeshAgent it goes on top of it and continue to walk on his head.

Anyway to fix this?

Okay I think I found the source of the problem. I started having this exact same issue, but I also noticed that my NavMesh agent was intersecting with the collider of the gameobject. When I moved the Navmesh agent so that it wasn’t touching the collider, I was no longer having my player teleport to the top of it.