AI loses sight perception continuously when using Move To node

C64debug
Wed, 10 Feb 2021 21:05:19 +0000
AI

I have an issue where the On Target Perception Event of the AI Perception component on the controller gets called continuously with the sight stimuli’s Successfully sensed value switching quickly from true to false.

I’m basically using the Move To node to strafe left to right when the AI is in combat mode. However, when reaching the Move To node the Perception Event is triggered with a Successfully Sensed value of false, even though the player always remains in sight (the AI is strafing and it has a vision of 90 degrees), and this is followed immediately by another Successfully Sensed with value true and so on, in a close loop.

This is my configuration:

This is where I check the value:

And this is the result:

If I remove the MoveTo node in my BT, then this behavior stops and the AI does not stop to sense the player unless the player moves away from sight (so, the event On Target Perception Event is no longer raised with a successfully sensed value of false).

You can see here that the node MoveTo is not followed by the wait node, and that’s because the MoveTo resets the Target Actor so the decorator aborts the whole branch:

I’ve seen similar questions in this forum, however no real answer here. Has someone seen this behavior? What can I try to solve it?

Thank you.
r.

17 posts - 4 participants