I created a Toggle so I can access my UI using my mouse using this little bit of code
if (bShowMouseCursor)
{
bShowMouseCursor = false;
SetIgnoreLookInput(false);
SetIgnoreMoveInput(false);
}
else
{
bShowMouseCursor = true;
SetIgnoreLookInput(true);
SetIgnoreMoveInput(true);
}
It works ok, but I have the issue that once I click on any UI widget like a button and toggle back to the game I have to click the canvas before my mouselook works again.
If I don’t use the UI and just toggle all works fine.
I tried the Blueprint UMGInventory sample by epic, and this has the same issue for me. click first to get mouselook back.
Can someone explain to me why this happens and how to force mouse focus back to the Character input?
Thanks!