Download

AI Character sight issues

I need that AI Player Character (which is controlled by transferring the location of mouse click to AI Move To) do not be able to rotate in his movement direction, while he sees the enemy. For this I set disable Orient Rotation To Movement parameter in CharMovementComp when he see enemy, and enable when he lost him.
Logic:



But, when I giving the order to move in opposite direction (more than PeripheralVisionHalfAngleDegrees value) AI Perception node Updated and set See Enemy variable to false, and along with this, Orient Rotation to Movement turn on, although he should still be able to see the enemy, since directional rotation is disabled. I guess it’s because AIPerception apply PeripheralVisionHalfAngleDegrees value, it’s just change sight borders to the movement direction.
Screen example:

And when the character stops sight borders change to the capsule direction:

In any cause, I don’t know how to fix it, so I ask for help from more advanced developers.