DEV Community

Maciej Sawicki
Maciej Sawicki

Posted on

[Game of Purpose] Day 18 - making flying animations

Today I followed up a second part of a flying tutorial, where I added animations.

I have to say that the tutorial was too fast. The author just told what to click and where without even explaining what was going on. So let me be clear what happened:

  1. First I imported custom Akai character model from mixamo.com.
  2. Then I imported Floating and Flying animations also from mixamo.com.
  3. Then I created IK Rig for both Manny (my current character) and Akai (the imported one), where I used their skeletal meshes to mark body parts. I selected elements responsible for moving Spine, Head, Left Arm, Ritht Arm, Left Leg and Right Leg and named them accordingly. This was important I think, because the internal structure looks different between these 2 models and doing this step we just mark common parts. Image description
  4. Animations I downloaded are strictly tied to a skeleton of Akai character, because they are from the same vendor (Or not??? I'm not sure). To make sure they work on Manny I created IK Retargeter. Inside I selected IK Rig for Akai as a source and IK Rig for Manny as a target. This way we can map that Head from one rig maps to a head to another rig. Image description
  5. Inside that IK Retargeter I exported Flying and Floating animations to a dedicated files. These animations work with Manny skeleton, whereas the original ones work with only Akai skeleton. Image description
  6. Then I created Blend Space 1d, which creates a smooth transition between the 2 animations. Inside I created a variable Speed, which controls which animation to choose more. The closer to 0, the more it's Floating; the closer to 600, the more it's Flying. Image description
  7. At last I needed to edit Animation Blueprint for Manny. First I needed to set up local variable IsFlying. Every animation tick it would be updated to a MovementComponent.IsFlying. I'm not sure why it was needed. We could use MovementComponent.IsFlying directly everywhere, but I guess it's so that this blueprint has a single source of truth and is more readable. Image description Now this step I don't quite understand. I disconnected the red line and connected Locomotion directly to the Output Pose. Why? Image description Then I edited Locomotion state machine with Flying state. Image description I updated all the transitions to and from the Flying state with a logic using the newly created IsFlying variable. Image description

Here is the final result:

There were some many files created that during the tutorial I didn't know why they were needed. Only during writing this post everything made sens after writing it down.

Top comments (0)