VirtualJoystick

Description

class VirtualJoystick

Constructor

new VirtualJoystick(leftJoystick)

Parameters

Name Type Description
optional leftJoystick boolean

Members

reverseLeftRight : boolean

reverseUpDown : boolean

deltaPosition : Vector3

pressed : boolean

Methods

setJoystickSensibility(newJoystickSensibility) void

Parameters

Name Type Description
newJoystickSensibility number

setJoystickColor(newColor) void

Change the color of the virtual joystick

Parameters

Name Type Description
newColor string a string that must be a CSS color value (like "red") or the hexa value (like "#FF0000")

setActionOnTouch(action) void

Parameters

Name Type Description
action

setAxisForLeftRight(axis) void

Parameters

Name Type Description
axis JoystickAxis

setAxisForUpDown(axis) void

Parameters

Name Type Description
axis JoystickAxis

releaseCanvas() void