Support Forum

Get path line from current Agent position

Hi, i’m making a RTS game and i’ve been converting from unity NavMesh to A*, everything works fine but when trying to display the path from a unit it behaves different from what i’d expect. Right now i’m using path.vectorPath to get the path’s points and setting them to a LineRenderer, doing this with UnityNav would make the path already traversed to disappear, but with A* the entire path is always displayed even the unit is almost at the end.
Is there any method or utility to get the points from the current position of the unit instead of getting all the points from the path?

Hi

Currently this particular API does not exist in the released version, however I have added it to my dev version, so it will be included in the next beta version (4.3.18).

If you really need it right now I can post the code modifications you have to make to get it working.

Hi, since this is not currently our highest priority in our project is not something really needed right now but if possible i’d appreciate if you could solve this for us.

Thanks for the quick response

Okay.
Yes. This method will be included in the next update of the beta version.