> For the complete documentation index, see [llms.txt](https://niam.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://niam.gitbook.io/documentation/game-creator-2/tactile/control-type/analog-stick.md).

# Analog Stick

## Description

The **Analog Stick**, also known as a joystick or thumbstick, is a versatile control type that enables smooth, continuous movement in any direction.&#x20;

It consists of a movable handle on a surface area that can be freely tilted within a defined range, making it ideal for controlling character movement, adjusting camera angles, or navigating 3D environments.&#x20;

<figure><img src="https://348920791-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeQ7CIxHuad77enwt80mG%2Fuploads%2FlOsCYMBs3aqWDWM6zSlu%2Fimage.png?alt=media&amp;token=a9a60ef6-9d1f-40ce-985c-247ec8bf8dfb" alt="" width="420"><figcaption></figcaption></figure>

## Common

* `Input Simulate` : The Vector2 control path of the input control to be simulate.

## Surface

The **Surface** refers to the circular region that defines the radius within which the **Handle** can move. It serves as the anchor point and an additional interaction zone for the Tactile Control.

* `Surface` :  A reference to the Rect Transform component representing the surface.
* `Padding` : Defines the padding or margin around the Surface. It adjusts the radius within which the Handle can move.
* `Dynamic` : Determines if the Surface moves towards the touch point on press.
* `Constrain` : Whether to restrict the surface's movement within the bounds of the Rect transform.
* `Reposition` : Whether the Surface returns to its original position after the interaction ends (on release).
* `Damping` : The smoothness applied to the surface's movement. Higher values result in smoother and slower transitions.

{% hint style="danger" %}
The **`Surface`** field is required and must be a child of Tactile Control.
{% endhint %}

{% hint style="info" %}
If the interaction area is smaller than the Surface area, any part of the Surface area outside the interaction area will not respond to interactions. Otherwise, the entire Surface area becomes interactive.
{% endhint %}

## Handle

The **Handle** is the movable, interactive part of the Analog Stick that the user drags or manipulates to control the input value. It starts at the center of a **Surface** area and can moves within a predefined range. When released, the handle typically returns to a centered position.

* `Handle` : A reference to the Rect Transform component representing the handle.
* `Axis` : Defines the axis of movement for the handle (e.g., X, Y, or both).
* `Relative` : Whether the handle's movement is relative to the initial touched point.
* `Sensitive` : Whether to immediately respond to user input or only when finger is moving.
* `Deadzone` : Whether to use custom deadzone. The values below the min are clamped to 0, while values above the max are clamped to 1. The default values comes from *Project Settings > Input System Package > Settings > Default Deadzone*.
* `Damping` : The smoothness applied to the handle's movement for dragging or recentering. Higher values result in smoother and slower transitions. This value will not influence the analog stick's value; it is solely for visual.

{% hint style="danger" %}
The **`Handle`** field is required and must be a child of **`Surface`**.
{% endhint %}

## Arrow

The **Arrow** is an indicator that rotates depending on the direction in which the **Handle** is being moved.

* `Arrow` : A reference to the Rect Transform component representing the arrow.
* `Origin` : The origin direction from which the arrow rotates.
* `Steps` : The number of discrete steps in the circular range that snap the arrow rotation movement.
* `Offset` : The angle offset in degree that adjusts the alignment of the steps.
* `Threshold` : The threshold value to show the arrow indicator. When set to 0 the Arrow will always visible; otherwise, becomes hidden after being released.
* `Damping` : The smoothness applied to the arrow's movement. Higher values result in smoother and slower transitions.

{% hint style="info" %}
It is optional, you can leave the **`Arrow`** field empty to not use the direction indicator.
{% endhint %}
