Hello!
To simply put it, how do I determine the next corner in a NavMeshAgent’s path?
public Vector3 GetNextCorner(NavMeshPath path) {
// Do something here
return corner;
}
Hello!
To simply put it, how do I determine the next corner in a NavMeshAgent’s path?
public Vector3 GetNextCorner(NavMeshPath path) {
// Do something here
return corner;
}
NavMeshPath is like a spline I think- I don’t believe it has any data about the current position of the character or which point is next or anything. You can do what you want using the NavMeshAgent though- I believe it’s the value of steeringTarget (it should be the next corner, OR the end of the path, if you’re nearing the end).
Totally wrong, navmeshagent.path.corners
That wasn’t very nice, no need to say that, what he said was just a way to do it, a better way you could’ve worded it was by saying
“Another way you can do this is by using NavMeshAgent.path.corners”