How to do it...

To synchronize animation of multiple objects, follow these steps:

  1. Open both objects in your 3D package (we are using Blender in this example).
  2. Synchronize both objects' animations in the 3D package. In our example, the animation has about 160 frames. Both objects have the same length of animation:
Ball and character animation synchronized in a 3D package
  1. In this example, the ball has no skeletal animation; we only animate its Transform.
  2. Make sure to have key frames for both the ball and the character in the first and last frames of the animation. This way, the animations will have equal length after importing them to Unity.
  3. After synchronizing the animation in a 3D package, save it to two files: one with only the ball object and its animation, and one only with the character and its animation. Unity can import multiple transform animations, but has problems with importing multiple skeletal animations (for example, you will not be able to set the rig to Humanoid).
  4. Export both files separately to FBX format and make sure to include the Default Take. In Blender, use the 6.1 version of FBX.
  5. Import both files to Unity.
  6. If you want to use a Humanoid character, make sure to set all the Based Upon options to Original in the Animation Import Settings.
  7. Create an Animator Controller for the ball and another one for the character with the soccer kick animation.
  8. Place the ball and the character in the same location on the scene. Attach the Animator Controllers to them.
  9. Play the game to see the effect.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.139.8