Can See Object - Nearest Target?

Storm

New member
Hi,

I am using Can See Object and it works well. My problem is, if there are multiple targets metting all requirements, it does not return the closest which results a strange behaviour, sometimes the most far target returns... How can I fix this? Is it normal or somehow my mistake?

Untitled.png
 
Can See Object is returning the object with the nearest angle. This is done within MovementUtility.WithinSight around line 30. You could change this to use the distance instead of the angle. In fact I like the idea of having a slider that switches between fully based on angle compared to fully based on distance.
 
Top