# GVS Player Input

{% hint style="warning" %}
Never modify iMoves files directly. Make a copy of the Unity's new input system asset and use that instead of iMove's GVS\_iMoveInputActions. Store your copy somewhere in your project, not within the GVS folders. Modifying an original iMove file may result in your data being overridden when iMove pushes an update.
{% endhint %}

## GVS Player Input  <img src="/files/YBpf7CC4lcc5iqgCG1vn" alt="" data-size="line">

The GVS Player Input component is found on your player, and allows you to quickly bind inputs from Unity's New Input System to useful actions within iMove or any other component.&#x20;

## Bindings

To bind different inputs from Unity's new input system asset, simply drag and drop them into the default inputs UI.&#x20;

<div align="left"><figure><img src="/files/bekFCBQSNNxrJnOeEedp" alt=""><figcaption></figcaption></figure></div>

## **Input Struct**

Default inputs can be accessed by code via the input struct. \
For example, to get the jump boolean: `bool test = GVS_Player_Input.Input.Jump`

## **Events**

There are Unity events for each default input. You can either access them via code `GVS_Player_Input.OnMovePressed.AddListener(YourMethodHere)` or by clicking the (+) button in the inspector, and assigning a method for when that event is called.&#x20;

Using the (+) button in the inspector is a great way to quickly add things like sounds to your actions.

## Toggle

By default, sprint and sneak have a toggle threshold of 0.25 seconds. This means that if you tap the sprint key once, it will toggle sprinting on. If you hold the sprint key longer than 0.25 seconds, the sprint will not toggle, but stay on until you release the key. To turn off toggling functionality, simply set the toggle threshold to 0.

## Custom Input Bindings

Custom input bindings can be used for anything you like. All you need to do is create an input action within Unity's new input system, then assign it to the custom binding. Make sure your custom binding matches the same variable type as your input action.

Here is an example of calling a custom iMove animation using a custom input binding:\
For more info on adding custom iMove animation actions, see [**this page**](/imove/getting-started/adding-custom-actions.md).

<div align="left"><figure><img src="/files/Xaxatnb6nGorACosjYV4" alt=""><figcaption></figcaption></figure></div>


---

# Agent Instructions: 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:

```
GET https://glass-vault-studio.gitbook.io/imove/components/gvs-player-input.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
