Mouse Cursor Disappears after Click

When I click down anywhere inside the Unreal Window, my mouse cursor disappears. Because of this, things like GetMousePosition() aren’t really helpful as I’m only going to receive that last position the mouse had when it was visible.

I have bShowMouseCursor = True for my PlayerController already set.

Am I missing something to capture the mouse position as I am clicking?

Ultimately, I’m just trying to detect if a user is dragging the mouse immediately after a click.

Maybe try setting the input mode to UI like this:

PlayerController->SetInputMode(FInputModeUIOnly());

Turns out the mouse cursor hiding is an explicit property of your Input Mode

I was using FInputModeGameAndUI you can get the mouse cursor to show after a click by simply doing…

// Inside your playerController....
FInputModeGameAndUI inputMode;
inputMode.SetHideCursorDuringCapture(false);
SetInputMode(inputMode);

Thanks for the input, got me thinking about the FInputModes…