Hey, I have a character which the player can not control it at the start of the game. On the begining of the game the player controls the camera.
Therefore on the begin:
Camera:
AutoPossessPlayer = EAutoReceiveInput::Player0;
Camera controller = PlayerController
Character:
AutoPossessPlayer = EAutoReceiveInput:: Disable;
Character controller = AiController
When the player takes control on the character he can rotate the character with the mouse (Like every third person game).
To move the character I use AddControllerYawInput which did not work, So I have read about the function over here: APawn::AddControllerYawInput | Unreal Engine Documentation and it seems to be that this funtion works only when the character controller is PlayerController.
I have tried to change the character controller to PlayerController and the rotation works, But when I am trying to change the controller when the player takes control over the character it does not work.
I have inferred that actor can not change its controller in the middle of the game.
How can I solve this? How can I use AddControllerYawInput?