Next Waypoint Distance using the RVO Agent

Hey Aron,
I was having a difficult time getting RVO to work until I used your RVO Agent script from the example you have in the plugin. I have used the AIPath script before I was using RVO and I was able to set the waypoint distance just fine, but i noticed this is not in your RVO agent script. Do you know how I can set the waypoint distance using your RVO agent script? Thanks Aron!

Here is what I see:

public void OnPathComplete (Path _p) {
	ABPath p = _p as ABPath;

	canSearchAgain = true;

	if (path != null) path.Release(this);
	path = p;
	p.Claim(this);

	if (p.error) {
		wp = 0;
		vectorPath = null;
		return;
	}
		
	Vector3 p1 = p.originalStartPoint;
	Vector3 p2 = transform.position;
	p1.y = p2.y;
	float d = (p2-p1).magnitude;
	wp = 0;

	vectorPath = p.vectorPath;
	Vector3 waypoint;

	for (float t = 0; t <= d; t += moveNextDist*0.6f) {
		wp--;
		Vector3 pos = p1 + (p2-p1)*t;

		do {
			wp++;
			waypoint = vectorPath[wp];
			waypoint.y = pos.y;
		} while ((pos - waypoint).sqrMagnitude < moveNextDist*moveNextDist && wp != vectorPath.Count-1);
	}
}

Hi

Do you mean the RVOExampleAgent script? That is just a very basic example script intended for that example scene. The AIPath script also supports the RVOController component and I would recommend that you use that one instead.

Thanks for your reply Aron. I have added a lot to the RVOExampleAgent script, but I will try to transfer it to the AIPath script and see how it goes. Thanks again!