Get Started With Unreal
Get Started With Unreal
2
1.3 Creating an input action for jumping
The only parameter important here is value type, it is set to digital because I
am either jumping or not so it’s like true or false.
3
1.6 BP_MainCharacter
4
1.8 Setting the look around logic:
5
This feature located in class default allows the player to jump higher if I hold
spacebar for only 0.5s
6
First uncheck this
And then check this box (use pawn control rotation) under the selfie stick.
7
2.3 Moving around
This function returns the direction where the player is looking.
This is the final function so that the player can move according to the camera
rotation.
8
I did this so that when the camera is facing parallel with the ground the player
won’t stop moving, the pitch need not to be connected.
Note:
Enabling this feature in the character movement lets the player face
automatically the direction in which the camera is moved.
Now this feature allows me to speed the rotation of the player according to the
camera movement.
9
3 Animation
Starting with the event graph, we get the velocity of the character, and we
store it into a variable called speed so we can call it later. After that, we create
a variable called InAir to check if the player is still in air or not.
In this section I connected the different state machines. In every state there is
the appropriate animation.
Loop animation under the running animation needs to be set to true for the
player to keep running whenever he faces a certain direction.
10
11