Skip to content
  • Android
  • iOS
  • Web

Joystick

Read directional touch input in a game loop.

Engine API Joysticknayan-ui/games

Live examples

Read the mutable stick coordinates inside the game loop. Both axes range from −1 to 1.

Example.tsx

Preparing preview…

Attributes

Joystick attributes
NameTypeDefaultDetails
sizenumberOptional
stateJoystickStateRequired
styleCSSPropertiesOptional
React Native API

React Native attributes

Joystick react native attributes
NameTypeDefaultDetails
sizenumberOptionalDiameter of the pad in points.
stateJoystickStateRequired
styleViewStyleOptional
Game Runtime module

Tags