API ReferenceJavaScript APIJoystickController

JoystickController

Properties

NameTypeDescription
isPressed(id: string) => booleanReturns true if the button with the given ID is pressed.
isJoystickPressed() => booleanReturns true if the joystick itself is pressed.
angle() => numberReturns the angle of the joystick in radians.
dpad() => { x: string; y: string; }Returns the direction of the joystick as a string.
destroy() => voidDestroy and remove the Joystick and its UI.