I ran into a problem with AI Perception sight. When a character with AI Perception is performing a MoveTo or RotateTowardBBEntry, the AI Perception sight cone instantly rotates toward the MoveTo (or RotateTowardBBEntry) location, instead of rotating with the character.
Link to video, watch closely as the sight cone snaps behind the character, and then the character turns toward the move to location: Google Drive: Sign-in
This means that the player could be standing behind the character, and on the first frame of the character rotating, be seen by the character. This may seem subtle, but during gameplay is extremely obvious, and seems like the character saw the player when he shouldn’t have.
Is there a work around for this? Is this a code bug?
I had seen steps 1, 2, and 3 under Pawn in another answer thread, and had already done those, but didn’t know step 1 under Controller and step 4 were necessary.
This almost helped me. After doing this, my character’s AIController rotation is being aligned to the character’s one only when he stops the movement. But while walking, it’s rotation is aligned to direction of movement - as before. Any ideas why?
AIPerceptionSight uses GetViewRotation() and GetPawnViewLocation() from Pawn.h to determine the sight location and rotation. Override these two functions and you are good to go.
I found a solution for this problem using only blueprints. You have to check “use desired controller rotation” in the character, and uncheck “orient rotation from movement”. Then you have ti uses Set focus and set focalpoint to rotate the controller and so the character.
Did you ever find the solution to this? I’m having the same issue where my AIController rotation on follows my Character once it’s finished moving to it’s destination