Processing Player Input
Let's think about a situation where the player presses the Jump 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 connect those two events.
Let's take a look at all the steps necessary that lead from one event to the other:
Hardware Input
: The player presses theSpacebar
key. UE4 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 action or axis. If there is an action or axis associated with that key, 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 theSpacebar
key is associated with the Jump action. - The
Player Controller
class: This is the first class to receive these events...