Blog Logo
TAGS

Godot 4 for Beginners [Part 5]: Player Input and Character Movement

Duration : 00:23:53

In this tutorial, Dev named Josh discusses action mappings and player input. He begins by introducing a character on the screen and explaining that nothing happens when interacting with it because there is no input wired up. He then goes on to define the actions the player can take in the project settings and maps them to specific keys or inputs. The defined actions include moving up, down, left, right, and shooting. Josh demonstrates how to map keys and inputs to each action, including the option to use a gamepad. Once all the actions are defined, Josh proceeds to clear out the existing script and establishes a class name for the player character script. He also sets a movement variable, move speed, and assigns it a value of 1000.0. Finally, Josh explains his approach to hiding certain variable values from other team members and provides them with the ability to adjust the move speed through a multiplier instead.