How to move mouse cursor with Gamepad stick?
Hi, I've enabled mouse cursor for a sort of menu stage and it moves and is controlled just fine with the mouse input, but how do I move it with the Gampead stick? Is this possible in BP at all?
asked Sep 01 '14 at 04:35 PM in Blueprint Scripting
Use Rama's plugin to move mouse cursor in BP https://answers.unrealengine.com/questions/37165/set-mouse-position-via-blueprint.html
All you just need is to set your gamepad stick to control BP function moving mouse cursor.
answered Sep 01 '14 at 10:05 PM
Go into the Project Settings and within the Input, set it up so you can use one of the Analog sticks as well as the mouse cursor. They should be listed as something like gamepad joystick x or something like that. Obviously you will need to setup the axis within blueprint but this would most probs be similar to how the default controls are setup with a character. I would supply a picture but I am not on my own computer at the moment. Let me know how you get on.
answered Sep 02 '14 at 02:32 PM
Hey Albert, I recently had to do this as well. This isn't perfect but it should get you on the right direction.
I used Rama's code for setting the cursor position in blueprints. (As a disclaimer I don't know C++ so this is sort of hobbled together)
Go to file Add Code to Project. Create a new class from PlayerController and call it NewPlayerController
in the .h file:
In the .cpp file:
After rebuilding, open your playercontroller blueprint and reparent it to your new playercontroller. Right click, and enter "Set mouse" and you should see the new node you created, under whatever category you entered in the .h file.
This is my playercontroller, controlling the cursor with the D pad:
answered Sep 15 '14 at 09:05 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here