> For the complete documentation index, see [llms.txt](https://vc-docs.gitbook.io/engine/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vc-docs.gitbook.io/engine/home/doxygen_synced/classes/class_player_input.md).

# PlayerInput

**Usage:** `api.PlayerInput.EnablePlayer()`

Exposes player input state and control methods to the JavaScript API layer. Provides access to the current input platform, virtual axis sensitivities, the player transform, and methods to enable or disable player control.

## Public Classes

|       | Name                                                                                                                                                                                                                                          |
| ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| class | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_player_input_1_1_current_platform.md"><strong>CurrentPlatform</strong></a><br>Defines constants for the supported input platform types.</p> |

## Public Functions

|      | Name                                                                                                                                                                                                                                                               |
| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| void | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_player_input.md#function-enableplayer"><strong>EnablePlayer</strong></a>()<br>Activates player control, starts recording input and display ui for controls.</p>  |
| void | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_player_input.md#function-disableplayer"><strong>DisablePlayer</strong></a>()<br>Deactivates player control,stops recording input and remove ui for controls.</p> |

## Public Properties

|            | Name                                                                                                                                                                                                                                                                      |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Platform   | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_player_input.md#property-currentplatform"><strong>currentPlatform</strong></a><br>Gets the currently active input platform (e.g. mouse/keyboard or touch).</p>          |
| float      | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_player_input.md#property-movehorizontalaxis"><strong>moveHorizontalAxis</strong></a><br>Gets the sensitivity of the horizontal strafing (left/right movement) axis.</p> |
| float      | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_player_input.md#property-moveverticalaxis"><strong>moveVerticalAxis</strong></a><br>Gets the sensitivity of the vertical movement (forward/back) axis.</p>              |
| float      | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_player_input.md#property-rotatehorizontalaxis"><strong>rotateHorizontalAxis</strong></a><br>Gets the sensitivity of the horizontal camera/look rotation axis.</p>       |
| float      | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_player_input.md#property-rotateverticalaxis"><strong>rotateVerticalAxis</strong></a><br>Gets the sensitivity of the vertical camera/look rotation axis.</p>             |
| Transform  | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_player_input.md#property-playertransform"><strong>playerTransform</strong></a><br>Gets the transform of the player object (position, rotation, scale).</p>              |
| GameObject | <p><a href="https://git.unimetaverse.net/vc-core-engine/doxygen/-/tree/main/Classes/Classes/class_player_input.md#property-player"><strong>player</strong></a><br>Returns the local player.</p>                                                                           |

## Public Functions Documentation

### function EnablePlayer

```csharp
static void EnablePlayer()
```

Activates player control, starts recording input and display ui for controls.

### function DisablePlayer

```csharp
static void DisablePlayer()
```

Deactivates player control,stops recording input and remove ui for controls.

## Public Property Documentation

### property currentPlatform

```csharp
static Platform currentPlatform;
```

Gets the currently active input platform (e.g. mouse/keyboard or touch).

### property moveHorizontalAxis

```csharp
static float moveHorizontalAxis;
```

Gets the sensitivity of the horizontal strafing (left/right movement) axis.

### property moveVerticalAxis

```csharp
static float moveVerticalAxis;
```

Gets the sensitivity of the vertical movement (forward/back) axis.

### property rotateHorizontalAxis

```csharp
static float rotateHorizontalAxis;
```

Gets the sensitivity of the horizontal camera/look rotation axis.

### property rotateVerticalAxis

```csharp
static float rotateVerticalAxis;
```

Gets the sensitivity of the vertical camera/look rotation axis.

### property playerTransform

```csharp
static Transform playerTransform;
```

Gets the transform of the player object (position, rotation, scale).

### property player

```csharp
static GameObject player;
```

Returns the local player.

***

Updated on 2026-07-22 at 12:00:00 +0800
