Hello,
I am using the following code to have a seeker wander my recast graph randomly:
if (!isSpotted && !isMoving)
{
if (parent.GetComponent<Seeker>().IsDone() == true)
{
parent.GetComponent<RichAI>().canSearch = false;
parent.GetComponent<RichAI>().canMove = true;
RandomPath rp = RandomPath.Construct(parent.transform.position, UnityEngine.Random.Range(5000, 20000));
parent.GetComponent<Seeker>().StartPath(rp);
isMoving = true;
}
}
I find that each time startpath is called, it is called 4 or 5 times, causing the entity to rotate rapidly between each path as the next subsequent path overrides the previous (all under 1 second). I am using the newest beta, RichAI, RVO and the destination setter, though at certain times I just want to submit straight to startpath (fleeing and random movement). Is startpath the best way to call the different path types with this setup? Any thoughts on why it would call multiple times rapidly?