Hi Aron,
I’m noticing weird behaviour when I’m adding an RVOSimulator component to a gameobject in Awake. The AI seem to just walk back and fourth like this:
Setup is like following:
using Pathfinding.RVO;
using UnityEngine;
public class RVOSimulatorWrapper : MonoBehaviour
{
private RVOSimulator simulator;
private void Awake()
{
Initialize();
}
public void Initialize()
{
if (GetComponent<RVOSimulator>() != null)
{
return;
}
simulator = gameObject.AddComponent<RVOSimulator>();
simulator.desiredSimulationFPS = 30;
simulator.movementPlane = MovementPlane.XY;
}
}
Also, in order for this to work I need to put the script execution order for the RVOSimulatorWrapper before all the stuff under the Pathfinding namespace, otherwise agents in the scene wouldn’t be able to find an RVOSimulator.
Is this a bug, or am I missing something ?