In my UMG file when a button is clicked I call a function which sets the player controller cinematicmode to true and sets bShowMouseCursor to false . However nothing seems to change until I click again. On the second click the mouse disappears and I have rotational control of the spectator pawn. Why is this happening and how can I stop it?
Here’s the blueprint:
And here’s the PlayerReady function:
void ABBPlayerController::PlayerReady()
{
ABBPlayerState* PS = Cast<ABBPlayerState>(PlayerState);
PRNTSCRN("PlayerReady");
bShowMouseCursor = false;
SetCinematicMode(false, true, true);
PS->PlayerReadyToPlay = true;
PS->bIsSpectator = true;
ChangeState(NAME_Spectating);
if (Role < ROLE_Authority)
{
ServerPlayerReady();
}
}