> For the complete documentation index, see [llms.txt](https://malbersanimations.gitbook.io/animal-controller/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://malbersanimations.gitbook.io/animal-controller/mobile/mobile-joystick.md).

# 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.

![](/files/-MKc2Js2z8TTxCQtw1qS)

## Parameters

![](/files/-MKbrmv54H8LtMxvIK-y)

### 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&#x20;

### 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

![](/files/-MKbrvl8o48Wo_7VIhaI)

### 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&#x20;

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://malbersanimations.gitbook.io/animal-controller/mobile/mobile-joystick.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
