π§Character Animation
In this section you will learn how to set up your animations
Step 1 - Import your animations
Specify the Generic or Humanoid rig. Bake the rotation and translation into the pose and specify the right avatar for your character.
Create a copy of your animation clip - we will need to make changes to it:
Step 2 - Animate the WeaponBone
Now we need to copy the animation data from the skeleton IK bone to the WeaponBone object.
Open up the Transform Retarget tool:
Select your animation as a Source and Target animation clip - thatβs because we want to copy the animation data within one animation.
Now add your in-game and IK Rig characters to the scene:
Now assign the transforms as follows:
After that you shoulf see keyframes for the WeaponBone in your animation:
Step 3 - Modify the Avatar Mask
Unity wonβt allow you to select a custom object like WeaponBone, because itβs not a part of the bone hierarchy.
For this go to the FPS Animator/Rig tab/Select your upper body avatar mask and click βSetup Avatar Maskβ. Now your mask should have an extra property:
At this point the animation setup is complete. Create an AnimSequence for your animation and add it to the weapon, check if thereβre any issues in the game.
Last updated