Read our guide on Joysticks before consulting this reference.
Adds a new static joystick to the screen at the given coordinates. A static joystick works only if you touch or click inside its outer radius. Other touches or clicks outside its outer radius will be ignored. Static doesn't mean immovable: you can move a static joystick by using the
set center for joystick block.
Adds a new relative joystick to the screen. For a relative joystick its center position is relative to the coordinates of mouse or touch first press. A relative joystick works only inside its own touch region.
Removes a joystick from the screen.
The direction of the joystick will be set to this default direction when the joystick is idle.
Useful when you want an actor to face towards a particular direction when the player doesn't press the joystick. The default value of default direction is 0.
Sets the inner or the outer radius to a given value for a joystick.
The default value of the outer radius is half the width of the outer joystick. The default value of the inner radius is half the width of the inner joystick.
Sets the x position, y position, the width and the height of the touch region of a joystick. You can use this block to update the position and/or the size of a touch region of an existing relative joystick.
Sets the image of the outer or inner part of a joystick. You need to have corresponding images inside your games "extras" folder, one for each scale:
imagename.png firstname.lastname@example.org email@example.com firstname.lastname@example.org email@example.com
Sets the joystick image transparency for a joystick.
Makes a relative joystick to be always hidden when it is idle. Since the position of a relative joystick is not so important, you can use this block to always hide a relative joystick id when there is no press to save some screen space.
Returns 'true' if the joystick is being pressed, 'false' otherwise.
Returns the distance or the direction of a joystick.
Distance is always a float number between 0 and 1. Direction is always a float number between 0 (inclusive) and 360 (exclusive), where 0 means that the joystick is facing towards right, and 90 means that the joystick is facing down.
Returns the x or the y coordinate of the center of a joystick.
Returns the outer or inner radius value for a joystick.
Returns the position or size of the touch region for a relative joystick.