I am wanting to generate a path between 2 points and then manually move an entity from waypoint to waypoint.
I am currently doing:
var startPosition = sourceGameObject.transform.position; var endPosition = destinationGameObject.Value.transform.position; var pathFinishedDeletate = new OnPathDelegate(path => { if (path.error) { OnPathFailed(path); } else { OnPathSuccess(path); } }); var pathPlaceholder = ABPath.Construct(startPosition, endPosition, pathFinishedDeletate); AstarPath.StartPath(pathPlaceholder);
The documentation is very unclear on how to use ABPath without a Seeker component. I was under the impression that the Seeker component is not needed and was just there to just simplify usages. So assuming I have an entity with a character controller and I want to move him to each waypoint is there anything wrong with the above?
As the moment I get OnPathSuccess and start itterating round the vectorPath the entity starts walking in the opposite direction… So not sure if I am doing something wrong or if there is something else amiss…