Disable/remove mouse controls from a top down gamemode in unreal

I am using the top down game mode for a game and I want to disable/remove mouse controls from the game mode and just use arrow keys for movement. I changed somethings and now the player doesnt move with mouse controls, however in order to move the player with arrow keys I still need to click the mouse button atleast once to start moving my character using keyboard, without the single mouse click my player doesnt move with keyboard. Kindly help

Can somebody help me with this?

How about, simply create the normal third person game. Move the camera to a top down position and delete mouse controls.

If you want the controls in that particular template itself, use this code to set up your input.

And in Edit → Project Settings → Input. Do this

1 Like

Thanks for your help. I did implement this, it works, the mouse controls for movement have stopped working. However I still need to left click once on the game to get focus and then only the keyboard controls work. Kindly help.

That is easy man. Create a boolean say canMove? and set its default value to false. Now make a branch for the moveforward and moveright above with canMove boolean as condition and attach the flow with true node.

Now,

Get input event left mouse click and on that event set canMove Boolean to true.

I need to get rid of that from the top down example, i mean i need to get rid of the mouse click

The keyboard works only when mouse is clicked…and i want to get rid of that

Isn’t that what you wantd? “however in order to move the player with arrow keys I still need to click the mouse button atleast once to start moving my character using keyboard, without the single mouse click my player doesnt move with keyboard. Kindly help”

no wanted to get rid of the mouse click…for for the confusion

sorry for the confusion

Hey JayNair-

On BeginPlay, you can add both a “GetPlayerController” and “SetInputModeGameOnly” node. This should remove the initial click to set focus to the game.

Cheers

Just go to your player controller and uncheck the property