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:
- First I imported custom Akai character model from mixamo.com.
- Then I imported Floating and Flying animations also from mixamo.com.
- 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.
- 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.
- 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.
- 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. - 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 aMovementComponent.IsFlying
. I'm not sure why it was needed. We could useMovementComponent.IsFlying
directly everywhere, but I guess it's so that this blueprint has a single source of truth and is more readable. Now this step I don't quite understand. I disconnected the red line and connected Locomotion directly to the Output Pose. Why? Then I edited Locomotion state machine with Flying state. I updated all the transitions to and from the Flying state with a logic using the newly createdIsFlying
variable.
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)