One great thing about using aRigidbodycomponent to control player movement is that we can easily add in different mechanics that rely on applied force, such as jumping. In this section, we'll get our player jumping, work with a new data type called enumerations, and write our first utility function.
A utility function is a class method that performs some kind of grunt work so we don't clutter up gameplay code. For instance, wanting to check whether the player capsule is touching the ground in order to jump (hint).
Enter enumerations
By definition, an enumeration type is a set, or collection, of named constants that belong to the same variable. These are useful when you want a collection of different values, but with the added benefit of them all being of the same parent type.
It's easier to show rather than tell with enumerations, so let's take a look at their syntax:
enum PlayerAction { Attack, Defend,...