Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

Animation not playing back (despite preview)

Discussion in 'Animation' started by ghoulfool, Jan 14, 2014.

  1. ghoulfool

    ghoulfool

    Joined:
    Jan 14, 2014
    Posts:
    16
    Hi there!
    I'm new to Unity and have been thrown in at the deep end. For a couple of days it's been good and I've not run into any difficulties...until now.

    I've been having problems playing back an animation from 3ds Max. Here's what I've got so far:

    A simple 40 frame bouncing ball anim created in 3ds Max, that I've exported via FBX, into Unity 4.3. I've added the anim as part of the hierarchy and switched on loop time in the inspector. I can see the anim working back fine in the preview window, but nothing happens when I preview the game.
    I may have missed a switch somewhere or there might be problems because I'm using an older version of Max (which might not have the all the options for the FBX exporter) but since it's showing up in the preview window I don't know what to do next.

    Any help would be appreciated. Thank you.
     
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    11,783
    First, are you using the legacy or Mecanim animation system?

    If you're using Mecanim, import your FBX's rig as Generic. The image below shows Animation Type as Humanoid. Change this to Generic.

    This should add an Animator component to your GameObject in the scene. Then you need to create an Animator Controller and add the bouncing ball animation clip to it. To add the clip, double-click the Animator Controller to open the Animator window. Then expand the FBX asset in the Project folder to show its animation clips. Then drag the clip onto the Animator window's canvas. Finally, assign this Animator Controller to your GameObject's Animator component.

    If you're using legacy, import your rig as Legacy. This will add an Animation component to your GameObject in the scene. The list of animation clips on the Animation component should include the bouncing ball clip. Select it as the main Clip property, and tick Play Automatically. When you play the scene, it should automatically play the bouncing ball clip.

    I hope that helps! Animation is a bit complex in Unity, and its having two animation systems doesn't make it any easier. :)
     
    Last edited: Jan 14, 2014
unityunity