Processing Player Input
Let’s think about a situation where the player presses the Jump Input Action, which is associated with the spacebar key, to get the player character to jump. Between the moment the player presses the Spacebar key and the moment the game makes the player character jump, quite a few things have to happen to connect those two events.
Let’s take a look at all of the necessary steps that lead from one event to the other:
Hardware Input
: The player presses the spacebar key. UE5 will be listening to this keypress event.- The
PlayerInput
class: After the key is pressed or released, this class will translate that key into an Input Action. If there is a corresponding Input Action, it will notify all classes that are listening to the action that it was just pressed, released, or updated. In this case, it will know that the Spacebar key is associated with the Jump Input Action. - The
Player Controller
class: This is the first class to receive...