Getting neighbours

Hello,

I’m wondering if there’s an easy way to get agents which are around an agent? I’m using RVOController.

Thanks in advance,
Dee Lucky

Hi

Sorry. Right now this is not exposed.

Looking over the code, the Agent.neighbours list could be made public. Is there any problems with me doing that on our side? If it gets fiddled with by the worker threads, then I can see iterating over it being a bad idea.

I want my different agents to react to each other in different ways - use IK to have them look at each other or whatnot. It seems silly for me to figure out which agents are adjacent to each other when that data already exists.

You can do that. You just have to make sure that you have ‘Double Buffering’ disabled on the RVOSimulator component. Otherwise you may end up with race conditions.