CanSeeObject intermittently stops triggering

hertzrat

New member
Hello,

I have a list of chickens that my hunter is trying to find. CanSeeObject works just fine most of the time, but randomly it just stops triggering sometimes. Sometimes it doesn't trigger the first time, sometimes it only triggers 1-4x, then stops triggering.

I tried changing the y offset to 1 or 2, but it doesn't seem to make a difference.

There is a global Chickens GameObjectList with 10 chickens in it using the 'character' layer mask. All chickens are on that layer. Sequence there is set to abort lower priority. The wander sequence will have another action there after I debug this.

Can See Object just occasionally stops ever becoming true.

1588956163600.png

1588956237100.png
 
Is the Targets Object correctly populated?

It looks like your Offset/Target Offset is 0 and I think that you mentioned this but I would try having them both be a value of 0.5 or 1. If that's still not the cause the best way to debug this is to place a breakpoint within CanSeeObject.OnUpdate and start stepping through the script to see where it is going wrong. Let me know if there is any logic within that script that I can add additional details for.
 
Top