Mobile Joystick is Interfering with Game Touch Functions

Hello Everyone!

I was recently trying to make one of my games mobile compatible, but came across a problem involving the joystick.

The game is all about flipping, and you change your flip velocity by dragging your finger up and down the screen while your jumping.

The problem is, if the playing is pressing the joystick down with their one hand, the system counts that as touching the screen, and the player spins out of control to the left.

I need a way for the game to not consider the players thumb on the joystick, so it doesn’t mess with the main touch functions.

My friend pointed out that arsenal somehow does this, so I know there must be a way.

If you have any ideas or solutions, please let me know.

Thanks, ExcessEnergy

3 Likes

Did you want to disable the controls on mobile all together?

Check out this article on the Developer Hub. It may be what you’re looking for.
If not, let me know and we can find another solution.

I was hoping to be able to keep them on screen, like in arsenal, but not have them mess with other functions involving touching the screen.

1 Like

Try moving your GUI’s a Bit Higher thats Probably the best solution.

Do you want to disable player controls all together? I’m not sure I understand.

Does the player move without the use of controls, besides the jumping with dragging their finger?

The problem isn’t the gui in the way. It’s that when the player is holding down the joystick to move, the program thinks that is them trying to move the camera.

The problem is that besides moving, the player also needs to drag their finger on the screen, at the same time as moving the joystick. I don’t know how to let the machine know that if the player is touching the joystick, not to count that as a mouse movement.

Does your game move the player on its own? Disabling the controls would allow you to do this.

No. The player has two ways of controlling the player. On the ground they control with the joystick. In the air then control by dragging the screen. I need the joystick in order for the player to move.

1 Like

Here’s a post on how to ignore the joystick.

Is this what you’re looking for? It allows you to drag across the screen and ignore the joystick.

1 Like

I’m pretty sure this is what I needed! Thank you very much!

1 Like