Joystick

Signature

function Joystick(player: PlayerState, options: JoystickOptions): JoystickController

Parameters

NameTypeDescription
playerPlayerStateThe PlayerState for the joystick.
optionsJoystickOptionsJoystick options.

Returns

JoystickController

Usage

import { Joystick, myPlayer } from 'playroomkit';
 
new Joystick(myPlayer(), {
  type: "dpad"
})