RVO Controller collides with unchecked layer

It seems if one RVO controller can collide with another it will overwrite an unchecked “Collides With” layer.

I’ll explain further:
I have 2 AI types. Player AI and Enemy AI. These both use RVO controllers for local avoidance and are set to Player and Enemy layers respectively.
I’m trying to make the Player AI to avoid the Enemies, but the Enemy AI shouldn’t avoid the players (they run into the player to kill). So on the RVO controller I set the Player to collide with everything, but the Enemy to not collide with the Player. However, it seems the enemies continue to avoid the player.
Is this the intended functionality? Is there a better way to solve this problem? Thanks!

Hi

Are you sure you set all the layer information on the RVOController? RVO layers are distinct from Unity layers. It will not look at the layer of the GameObject at all, only on the layer set on the RVOController.

Yeah, the layers are set on the RVO controllers.

Hmm, so if this should definitely be working it may be possible that other behaviors are causing the enemies to hesitate to run into the player. Maybe the destination of the enemy’s path doesn’t meet with the player since the player would be backing away from the enemy.

Hi

I double checked with a setup like

  • Agent A: Layer 1, avoids layer 1 and 2
  • Agent B: Layer 2, avoids layer 2 only

Result is that when A tries to move past B, B doesn’t react in any way, while A tries to avoid B.

Thanks I really appreciate the confirmation. It must be the other behavior I described. Really love this asset!

1 Like