GVS Player Input

GVS Player Input

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.

Bindings

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

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.

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.

Last updated