[Common UI] How to show mouse cursor with gamepad and desactive the cursor recentering ?

Hello I currently work on my graduation game project, the game has a drawing system usable with a gamepad, and i recently added the common UI plugin in order to have a better control of the UI using the gamepad

At first, when I pressed any button on my controller the cursor disappeared and… to draw I pressed the right trigger and moved the cursor with the left stick, but when I stop moving the cursor with it it automatically returns at the center of the screen.

Does anyone know how to deactivate the cursor recentering and how to enable a custom cursor sprite using the gamepad ?

How are you moving your cursor?

I gues, by setting its position ti the current value of a Direction?

If so, scrap that…
Create a new Vector2 Variable called CursorPosition and set the cursor position to this.
And with the Direction input, add/sub a little amount to the corresponding XY of the Vector2 (Get Variable > add to value > set variable > set cursor pos to variable)

That way, the Vectir2 stays if you stop moving and you can manually recenter it by setting the Vec2 values.

Sorry for taking so much time to reply. :sweat_smile:

I set up my variable and it’s worked thank you very much, it was so simple !

Do you have any idea to show the cursor with the gamepad now ?

Did you ever get that cursor to show with the gamepad? Thanks!

1 Like

Did you find a solution to this by chance?

my solution:

5 Likes

You are an absolute legend. We have been looking into the Common UI source code and did not get deep enough to find the second command. Many thanks! :robot::champagne:

Problem doesn’t go away for me using the commands. Made a new post about it.

legend

1 Like