Found a bug in RVOQuadtreeBurst.cs

Hello, while looking for how to use the RVO, I found an error in the code (a copy and paste bug)

Version: 4.3.46 (2021-07-21)
File : RVOQuadtreeBurst.cs
Function : CalculateSpeeds()
Line: ~260

    float radius = 0;
    for (int j = startIndex; j < endIndex; j++) speed = math.max(radius, agentRadii[agents[j]]);
    outMaxRadius[i] = radius;

The variable speed is used instead of the variable radius


That could indeed have been the cause of many weird glitches. I have no idea how you found it, but thank you! A fix will be included in the next beta version.

I use RVO to create a pseudo agent that stays away from the player, by changing the radius of the RVO (with a custom script), for a mage, an archer, for example.
But, it didn’t work very well, especially with the other agents. So, I searched how the radius was calculated, and I found this problem.

1 Like