AI should only be able to move if player doesnt see it

I think maybe better solution would be to determine an angle between player’s forward vector and npc trace vector, and block movement only if it is less than FOV of the camera.