Lumberyard
User Guide (Version 1.15)

Input

Component entity system is in preview release and is subject to change.

You can use the Input component to bind raw input to events in your game. The Input component references an .inputbindings file, which binds a set of inputs (such as from a mouse, keyboard, game controller, and so on) to an event.

For example, you can add the Input component to an entity and specify in the .inputbindings file that when you press the keyboard spacebar, the entity rotates.

Note

To work with inputs, you must enable the Input Management Framework and the Starting Point Input gems. For more information, see Using Gems to Add Modular Features and Assets.

Input Properties


                Input component properties window.

The Input component has the following properties.

Name Description
Input to event bindings

References an .inputbindings file that defines the bindings of raw input to events.

Input contexts

String to specify valid context(s) for the .inputbindings file.

An empty string "" is the default context. This context is active whenever it is explicitly pushed to the top of the input context stack, or when the input context stack is empty.

You can use this parameter to specify what context asset binding is available for the component. This is useful if you want the component to switch between different input events.

For an example of working with contexts, see Input Request Bus.

Note

Input event bus (EBus) messages are not generated while the Console window is open.

On this page: