- Home /
NavMeshAgent Not Accounting for Objects
Hi, I'm creating navmeshes at runtime with LocalNavMeshBuilder/NavMeshSourceTag from here: https://github.com/Unity-Technologies/NavMeshComponents
While the agent does reroute itself when things are placed in front of it, I'm trying to prevent it being boxed in entirely. CalculatePath() always returns PathComplete because when totally blocked, the agent returns to a straight line path as if no terrain was there, and thinks it can go through the walls, when it clearly cannot, and remains stuck.
I've tried setting the 1x2x1 cube prefab to static, even though advised not to, but that changes nothing. If anyone knows why, and how to fix this, it would be greatly appreciated. They are just ProBuilder cubes with a NavMeshSourceTag, and box collider as a trigger for other things.