Joystick X and Y questions



So I’m making a game with a joystick, with the player always centered. And I want the X and Y to change when the joystick is moved. However I don’t understand how it works.


Agreed. This has always confuddeled me as well, so help please.


Cool topic!


Ah good you added the tag.


Lgbot please


Maybe publish a wip, so people can see it?


I thought there was a in app tutorial for that


For the joystick yes, but not for moving biased on the joystick.


With the player centered.


Like X and Y like when my character is moved (character is always centered) the variable X and Y are changed


Yea just make the other objects move Instead of the character


So I don’t know specifically how to do it, but if the character stays centered in the middle of the screen, then you have to make everything in the world move in the opposite direction of the way the character is “moving”.

@Funky_63_Greenland did projects like this sometimes. Here is one such project that you can look at the code of:


How you approach this will depend on if you want to also incorporate collision checking.

Here’s a sample project I coded recently that incorporates collision checking:

If all you want is everything to move, it’s pretty simple

  • X/Y moment values are reset to 0
  • The keypad/joystick sets the values for the X and/or Y movement (in the opposite direction as t7lks said)
  • The “world objects” Set Position to their current position plus the X/Y movement (put this in a custom rule of When [‘X movement’ < > 0 OR ‘Y movement’ < > 0 ] and add it to all objects that should move


Ok I know how to do this! TDO ask me if you have any doubt! (But plz be specific!!! Plzplzplzplz)


Like Bumpsplats HoverTanx kinda movement. Yeah or ur fish game thingy. I’m still confused…


What fish game???


I got a code to generate a joystick if you want I can pass it to u


I mean like the game where u eat the fish and get bigger? U made it


Nope… I nominated it for featured, but I made this game (lemme post it)


Here @TheDeliciousOrange
U know how to open this kind of WIPs right?