Download

Cursor gets stuck and fights against mouse movement when holding left-click in Topdown template

When I start my game from the main menu by clicking on “Start Game” after my level loads (using level streaming) and I hold left-click to move the cursor gets locked in place until I let go. If I launch my game straight from the persistent level then holding left-click works fine. It looks like something happens between the main menu and persistent level.

If I “Set Show Mouse Cursor” at the start of PersistentLevel’s BeginPlay to False in level blueprint, then it works fine. Another solution I found is to instead uncheck “Hide Cursor During Capture” in “Set Input Game and UI Mode” in MainMenu’s level blueprint.

Could anybody help me understand why the in-game cursor gets locked if I enable “Hide Cursor During Capture”?

Solution A: Set “Show Mouse Cursor” to False in BeginPlay in PersistenLevel’s level blueprint

Solution B: Uncheck “Hide Cursor During Capture” in “Set Input Game and UI Mode” in MainMenu’s level blueprint

I’ve been doing some research and testing, but still can’t explain to myself exactly why setting Hide Cursor During Capture to True causes in-game cursor to get stuck in place while I hold down left mouse button.

Is it because the game can’t find the cursor when I hold the left mouse button down and therefore uses the last known cursor position until I let go?

hide_cursor_during_capture_false

Hide Cursor During Capture set to False - cursor can be moved around while holding left mouse button down.

hide_cursor_during_capture_true
Hide Cursor During Capture set to True - cursor can’t be moved around while holding left mouse button down. You can barely see it but the green decal that follows the cursor jitters a bit because I’m moving my mouse around.