Pathfinding and obstacle detection with navMesh