Hey Aron,
I am trying to use LimitLength() from this post: Link
I am trying to adjust ABPath.vectorPath, but the _navAgent seems to ignore this, and uses the unmodified version:
// Construct a path TOWARDS the "destination", and see if too far.
ABPath p = ABPath.Construct(transform.position, _destination);
p.nnConstraint.tags = NavTagMasks.playerWalkable; //only allow to walk on this tag
AstarPath.StartPath(p);
yield return p.WaitForPath();
_navAgentSeeker.PostProcess(p);
//test to see if vector-path adjustment works. Set to 2 same coords:
p.vectorPath.Clear();
p.vectorPath.Add( _navAgent.position );
p.vectorPath.Add( _navAgent.position );
navAgent.SetPath(p);//RichAI
Later in my other Moving-coroutine I call:
Vector3 wantedPos_ai;
Quaternion wantedRot_ai;
//compute how the ai wants to move:
_navAgent.MovementUpdate( Time.deltaTime, out wantedPos_ai, out wantedRot_ai );
/*some more code*/
_navAgent.FinalizeMovement( nextPos, nextRot );
I expected the creature to remain in place, but it seems to use the original path when stopping at a breakpoint in Visual Studio. In Unity3D the monster indeed runs via the original (non-truncated path)
here I am using RichAI.SetPath() and AStar version 4.4.2
Do I forget to call something / using wrong approach?
Thanks!