Getting all path Positions from navMeshAgent current path?

hi,

since yesterday i was trying to find away to get Vector3 positions of the path that navMeshAgent will perform to reach destination… but i couldn’t figure it out yet…is it possible to obtain such information as array of vector3 points??
i tried using “nextPosition” but it seems it is not changing…
unless maybe agent it self is enabled to move to determine next point then it updates nextPosition???.. :face_with_spiral_eyes:
the problem is i don’t want to give agent authority to modify transform position…

i don’t like how the agent controls movement, i have my own script that handles movements and obstacle avoidance, in my case… i only want to find path from point A to B, and pass these position points to my script to handle movements…

i tried searching around and i haven’t seen many asks this question… :face_with_spiral_eyes:

thanks

After you have calculated the path you can use the NavAgent.path property to get the currently computed path. This is of type NavMeshPath which contains the ‘Corners’ (waypoints) of the path.

http://docs.unity3d.com/Documentation/ScriptReference/NavMeshPath.html

Thanks you!
i checked meshpath abit before, but didn’t know “corners” was the one which referring to path waypoints… interesting :o