Hi,
I have been doing a lot of googling to find solutions to my problem but not seem to take into account navmesh obstacles. I am trying to use the NavMesh.CalculatePath() function to get the path that would be traversed between point A and point B. (Note: my agent is not at either point)
NavMeshPath path = new NavMeshPath();
path.ClearCorners();
NavMesh.CalculatePath(pointA.transform.position, pointB.transform.position, agent.areaMask, path);
When I do this, however, the path that it finds goes directly through obstacles as if they are not there.
When I use other Calculate path functions from the agents current location or simply when the agent is traversing the terrain, the obstacles are taken into account as expected.