🚀 Spring Sale is live! 🚀 Don't miss your chance to get all my products at 30% OFF!  

Get it!

Input System Component

Overview

The input system component is an ActorComponent designed to be mounted on Pawn and is the core of the input system.

Simply mount this component to the corresponding Actor to start using the input system.

Below are the main APIs of this component. Each function has detailed comments providing usage instructions, which will not be repeated here.

gips input api

Component parameters

gips component settings

InputMappingContext

This InputMappingContext will automatically be added to EnhancedInputSubsystem when the player has a valid EnhancedInputComponent.

InputConfig

Main configuration of input system.

InputControlSetups

InputControl setups, the last one will be used as the current one.

Input configuration

InputConfig is a data asset of type GIPS_InputConfig.

The above picture is a case of InputConfig, which is mainly used to associate your InputAction with InputTag one-to-one, and whether to bind the event of input action value change. If "ValueBinding" is checked, you can get the current value of InputAction through InputTag.

It can also configure all input buffer windows, more about input buffering here .

gips input config

Input processing flow

Please check the Input control setup.

Get input action value change

Listen through events

The input system component provides multiple events that allow you to respond to input events externally , as well as asynchronous nodes for ease of use.

gips input event listen

Get values anywhere

Usually, if you want to obtain the current value of an InputAction from a blueprint or a specific InputAction, you need to reference the corresponding InputAction asset in the Actor's event graph.

Using input system component, you can get the current value of the input through Tag anywhere in your project without having to hard reference specific input actions.

If you need to access the value through Tag, please check "ValueBinding" in InputConfig
gips get input value

External processing input

Sometimes, you just want to use the convenience brought by the mapping between InputAction and InputTag, but do not want to go through the built-in input processing flow. In this case, you can turn off the built-in input processing flow by checking "ProcessingInputExternally".

gips externally input setting

Then handle various logics through events.

gips event handing
Typically, you can mix the two approaches and incrementally create and accumulate your own reusable input processors.