Hello, I have problem with local avoidance system.
I used one RVOSimulator object, and several RVOContoller in scene.
when I create some object at sametime; like 5~20 gameobject contain RVOController,
sometimes freezes problem ouccured. Same problem ouccured in Unity editor and Android build.
It it very critical issue so I can’t release my game at this time.
This problem occured by RVOCoreSimulator code.
public void Run () {
#if NET_4_6 || NET_STANDARD_2_0
runFlag.Wait();
runFlag.Reset();
#else
runFlag.WaitOne();
#endif
while (!terminate) {
try {
List<Agent> agents = simulator.GetAgents();
if (task == 0) {
for (int i = start; i < end; i++) {
agents[i].CalculateNeighbours();
agents[i].CalculateVelocity(context);
}
} else if (task == 1) {
for (int i = start; i < end; i++) {
agents[i].BufferSwitch();
}
} else if (task == 2) {
simulator.BuildQuadtree();
} else {
Debug.LogError("Invalid Task Number: " + task);
throw new System.Exception("Invalid Task Number: " + task);
}
} catch (System.Exception e) {
Debug.LogError(e);
}
waitFlag.Set();
#if NET_4_6 || NET_STANDARD_2_0
**runFlag.Wait();**
runFlag.Reset();
#else
runFlag.WaitOne();
#endif
}
}