I have been looking for resources on obtaining APlayerController from ACharacter. So far, I see a few questions about enabling input, and answers to those questions saying to override SetupInputComponent method.
But I don’t see how to get APlayerController from ACharacter, even though ACharacter should be able to retrieve APlayerController in some way.
Does anyone know how to do this, and if possible, explain it in detail? Thanks in advance.
I haven’t tried this with the default APlayerController, I’m using my own APlayerController(named ATBPlayerController)
and get it like this in the ACharacter class(named ATBCharacter)
But,
ACharacter also has an Controller variable, this variable should be the controller/playercontroller which possesses the ACharacter, so this should work if u are using the default one.