Ai Sense - OnTargetPerceptionUpdate

Hi,

I am trying to modify my AI-Pawns walking speed when it senses another “colleague”.
It sort of works, in the way that the pawn stops moving however, after a few seconds it starts moving again even due the other pawn is still in his line of sight. Why is that? How can I change that?

It looks like on True it sets the walk speed to 0, which will completely stop the movement because the speed is zero, that node should be either the starting or normal walk speed or whatever speed you are wanting it to be and not 0…0 means stop or no can move. Basically the way you have it now is if successfully sensed is true → stop moving any faster than 0 if false move at a speed of 800.

Try changing the values of the True path and it should work the way you are intending…or at least not stopping anymore.

I am aware that the value ‘0’ will result in a stop. What I don’t understand is: why once the bot stopped for a few seconds it seems to start moving again.

Because the bool value changed to false and the walk speed was set to a value of more than 0

You can see in your screenshot that the two fired in quick succession hence the execution lines highlighting in the screenshot, so the values are firing for setting the walk speed to 0 and to 800