Player Input

The Player Input component is in charge of registering the configuration of every possible input, as well as activating the correct reactions.

If we are not on the prefab, we will get the following message. We simply have to click on Select Prefab, as shown in the following screenshot:

Once we click on it, we will be able to see the following:

We will find the following properties in this component:

Input Type

This will set the input for playing the game to either Mouse And Keyboard or Controller.

Pause

Each one of these input properties has three sub-properties that we can
change in order to configure the user input:
  • Key: Sets the keyboard key that triggers the input event
  • Controller Button: Sets the controller button that triggers the input event
  • Enabled: A checkbox that selects whether the given input is enabled or not

Interact

Melee Attack

Ranged Attack

Jump

Vertical

Each one of these input properties has three sub-properties we can
change, in order to configure the user input:
  • Positive: This orients the controller axis to Positive, where horizontal is right and vertical is up
  • Negative: This orients the controller axis to Negative, where horizontal is left and vertical is down
  • Controller Axis: Sets which axis of the Controller will map this input

Horizontal

Persistence Type

This defines the Persistent Type of the given input configuration. We won't need to use this, as we won't be dealing with input configuration saving.

Data Tag

This defines the Data Tag of the configuration. We won't need to use this, as we won't be dealing with input configuration saving

 

We can try changing the input and make it as we prefer now.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.96.247