I set up a AIPerceptionComponent using sight on my AIController. It’s able to sense all registered stimuli fine and process them via the delegates. One of the stimuli is the player and it follows the player using it. However, while following/moving around, the perceptionComponent doesn’t rotate with the pawn and will continue to face in the original direction.
I’m using a BehaviorTree and MoveTo Task for the AI Movement. If at the map load, I eject out of the player pawn and manually rotate the AICharacter, the perceptionComponent correctly rotates with it.
Is there something that I need to set up in order for it to rotate with the pawn?
I have the same problem with my UAIPerceptionComponent. However I found out that the problem comes from the AIController. I found a work around but I can’t explain you why this works (I’m new in UE4, but not to programming). You need to create a Blueprint class based on the Controller you created then you need to set the Blueprint Controller as the AIControllerClass (the easiest way to attach this is to do this in BP not Cpp).
I hope I could help you
EDIT:
I solved the Problem by overriding the following function
Sorry to revive this, but your answer has just saved me. I had tried a lot of rotation combinations between Controller and Actor/CharacterMovement but nothing worked.