Mobile Joystick

Overview

This component is in charge of calculating the resulting Vector2 Axis from moving a UI Joystick.

Use the sample prefab provided as starting point.

Parameters

Invert X

Inverts the Horizontal value of the Joystick

Invert Y

Inverts the Horizontal value of the Joystick

Drag

If true, then the joystick will not use the starting position as guide for calculating the movement axis. Useful for making an area Joystick. E.g. Camera Area Joystick Prefab.

Death Point

If the Axis Magnitude is lower than this value then the Axis will zero out

Sensitivity X

Multiplier value for the Horizontal movement. Higher values more

Sensitivity Y

Multiplier value for the Vertical movement

References

All References values are the internal values of the Joystick component logic. They can be used as scriptable variables so they can be used by other components

Axis Value

Axis value of the Joystick. X -> Horizontal value; Y -> Vertical Value

Pressed

Store whether if the joystick is pressed or not

Events

On Joystick Down

Invoked when the joystick is pressed down.

On Joystick Up

Invoked when the joystick is released.

On Joystick Pressed (bool)

Invoked when the joystick changes its press value (True: Press Down, False: Released)

On Axis Change (Vector2)

Invoked the axis value of the Joystick. X -> Horizontal value; Y -> Vertical Value

On X Axis Change

Invoked when the Horizontal(X) value of the Joystick changes.

On Y Axis Change

Invoked when the Vertical(Y) value of the Joystick changes.

Last updated