WithinDistance should ignore its own GameObject

dancinggoat23

New member
I'm using WithinDistance to cause AI units to engage in simulated 'conversation' with each other. I've noticed that if I use a layer mask to trigger this task, and all involved units are set to that mask, the WithinDistance task returns its own GameObject. I propose modifying line 89 in WithinDistance.cs to test for this:

Code:
if (objects[i] == null ||  objects[i] == gameObject) {
Thoughts?
 
Last edited:
Top