- Home /
NavMeshAgent falling through on the floor below after Carve.
I'm having problem with NavMeshAgent in Unity 2012.2.1f1 as well as 2017.1.2f1. In my scenario I have two floors placed one above another, and on the upper one NavMeshAgent, NavigationStatic-flagged block, and NavMeshObstacle (with Carving only on stationary) are placed. I'm using the new NavMesh scripts, so I bake the NavMesh on game start. The agent has destination point placed inside the static-flagged one, so it stops at the edge of the block. Now, the problem is that when I move the other block (the one that has carving NavMeshObstacle on it), the NavMeshAgent is moved on the bottom floor. It seems that the very moment NavMeshSurface recalculates mesh and NavMeshAgent is pushing on the edge of the first block is when the problem occurs.
This scenario is simplified version of the in-game situation in which I first found out of this problem.
Example project is attached. To reproduce just start the game and when player is at the first cube, try moving the other one.
EDIT: Issue has been reported.
I' am afraid this looks like a bug indeed. I tried several work arounds (like disabling navmesh agent when obstacle moves if agent does not moving (it does not fall through while moving ) and increasing time to stationary and $$anonymous$$ove threshold values etc..) its kinda worked if obstacle does not move too much but. still it was very un consistent.
the only way to solve this problem with current build is disabling carve as far as I saw. I hope unity $$anonymous$$m solves this at next patch.
Answer by dariorivolta · Jul 05, 2021 at 10:51 PM
Hi, i think I have your same problem. Did you manage to solve it?