I know this must be easy thing to do, but still, how do I go if I want client player viewport size?
I’m making isometric shooter and I need it to get correct mouse cursor position, but everytime I try to get Player controller (which is, I suppose, holds viewport information) on client instance of the game I get nullptr.
APlayerController * PlayerController;
I’ve tried few ways:
Cast<APlayerController>(GetController());
PlayerController = Cast<APlayerController>(GetController());
And:
PlayerController = GetNetOwningPlayer()->GetPlayerController(GetWorld());
But both of them return nullptr on clients. Help pelase!