Topdown template: mouse won't move when holding left-click

Video: Mouse can’t be moved when holding left-click to move

I’m using the Topdown UE4 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 the mouse gets locked in place until I let go. If I launch my game straight from the persistent level then holding left-click works fine. So it looks like something happens between the main menu and persistent level.

I think I found the cause. If I “Set Show Mouse Cursor” at the start of PersistentLevel’s BeginPlay to False in level blueprint, then once it loads a level the game won’t lock the mouse when holding left-click button to move. Another solution is to instead uncheck “Hide Cursor During Capture” in “Set Input Game and UI Mode” in MainMenu’s level blueprint. Then you don’t need to “Set Show Mouse Cursor” at the start of PersistentLevel’s BeginPlay to False and MainMenu still works as intended. I’m not sure why hiding the cursor fixes the mouse lock issue.

Can anybody help me understand engine’s logic behind this?

Solution A: Set Show Mouse Cursor to False in BeginPlay in PersistenLevel’s level blueprint - blueprintUE | PasteBin For Unreal Engine

Solution B: Uncheck “Hide Cursor During Capture” in “Set Input Game and UI Mode” in MainMenu’s level blueprint - blueprintUE | PasteBin For Unreal Engine

1 Like