RVO Controller agents avoiding disabled agents

Hi. I’m making a game with one player and a bunch of enemies, and enemies uses RVO controller + local avoidance. I need them to stop avoiding the “dead” agents, or disable RVO for some agents. How can i achieve that?

Hi
You can set the RVOLayer.Layer30 as a dead enemy layer.
then for every alive player and enemy

var rvo = GetComponent<RVOController>();
rvo.layer = RVOLayer.DefaultAgent;
rvo.collidesWith = (RVOLayer)(-1) ^ RVOLayer.Layer30;

change the layer for the dead person

var rvo = GetComponent<RVOController>();
rvo.layer = RVOLayer.Layer30;
rvo.collidesWith = RVOLayer.Layer30;

have not tested it, but the solution is like that

2 Likes

It works, thank you!