[C++] Post-login get Character
I'm trying to get the character controlled by the given APlayerController in the AGameMode::PostLogin function. But APlayerController::GetContolledPawn, as well as APlayerController::GetCharacter returns... Nothing
Is that normal ? How can I get the pawn owned by the APlayerController ?
Thanks for your help
asked Mar 08 '16 at 09:09 AM in C++ Programming
I'm not sure exactly what your code looks like, but the following code works for me:
When I play in editor or standalone mode I do see "Testing" printed to the screen. Since you are trying to get the pawn, you'll want to make sure that you are casting to the pawn class so that the cast will succeed. Let me know if this helps.
answered Mar 10 '16 at 01:55 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here