Have you ever felt your focus bouncing all over everywhere in moments of boredom?
I start the day with a quick asset download from good ol' Gorka. Once you have done the same, import those FBX files into the skeleton of a preferably humanoid mesh. The default manequinn is a preferable choice.
To create a transitional animation sequence between more than one animation, Blend Space 1D is needed. Before placing the animations into the keyframe, in the Asset Details menu is a horizontal axis section. Rename it to Speed for reference's sake, then set its max value to your player's max speed. I place my three animations - walk in place, walk forward, and run forward - from lowest to highest (left to right) axis value on the keyframe.
We will now dredge into the depths of a newly made animation blueprint. Its interior, an AnimGraph, can be filled with state machines you can add animations into.
In the context of player locomotion, the state machine of the same name contains multiple states of being from standing idly to running speedily. You will learn how to transition the player between states based on variable conditions.
Transitions have blend modes which affect their play speed per duration. Each provide different calculations between transition rate and variables such as speed and direction. For now, the cubic mode is chosen to simulate believable locomotive physics since it takes milliseconds for a human to pick up speed after running.
Here is a trick to rapidly complete the straightforward transition from the Stop to Idle state: activating the Automatic Rule Based Transition on the transition's Details tab tells the system to enter the Idle state as soon as the Stop state is complete.
Caches in animation blueprints store calculations of animations, which allow them to be reused and extracted without repeated calculations.
Animation slots let creators mix and match animations from different sources to create more complex movements. A common use for slots is blending animation nodes from actor blueprints with animations played here.
Once you have connected your ABP nodes with one another, head to your player blueprint. Change the animation class to your new ABP.
You changed the class, ran the game… and it is stuck at the idle state despite moving around.
The above is a result of the Speed variable not being linked to the player's movement. To have the Speed variable measure the live speed of your player, fetch its velocity, convert it into vector length, then set the value of Speed to this frame's vector length.