
I got both the model and all the used animations from Mixamo. I used a simple UE5 blend space to combine the three animations so that they would "blend" together. I set the horizontal axis to be"Speed" and gave it a min/max of 0 and 500. Then I set my idle animation to 0, walk to 200, and run to 500. I then added a weight speed of 2 to help blend those anims together.
This is the beginning of my character blueprint. It starts by mapping my IMC so that I have access to basic controls like WASD and casts that go to the player controller. Then it moves to the actual movement input where those controls are executed. It checks to see if the character is jumping. If it isn't, then it gets the rotational control for the X and Z and converts that into a right vector. I then do the exact same thing for the forward vector.
Then I just have the camera controls that allow the player to look around using "Add controller inputs".

The end of the blueprint is the jumping logic, which is nothing too special. I created a new IA for jumping and assigned it to the space bar. If the character isn't jumping, then it jumps. If it isn't, then it won't. Finally, it just uses some built-in Unreal events to set the variable for repeatability.
This is my animation blueprint, in which I start by casting to my character blueprint so that they can talk to each other. The Update block is casting my velocity variable along with my speed variable and the falling variable to be used in my animation states.


No comments:
Post a Comment