Search Unity

Animation Problem

Discussion in 'Formats & External Tools' started by Sam Shiels, May 31, 2007.

  1. Sam Shiels

    Sam Shiels

    Joined:
    Feb 25, 2007
    Posts:
    160
    I need help playing animations, the model seems to play only 1 pose in the animation.

    I'm using Dim3 Inspire.

    Can someone help me?
     
  2. Sam Shiels

    Sam Shiels

    Joined:
    Feb 25, 2007
    Posts:
    160
    Could someone reply please?
     
  3. pete

    pete

    Joined:
    Jul 21, 2005
    Posts:
    1,647
    i don't use dim. so i probably can't be much help other than to say be more specific with your question. what are you doing in unity? did you break your animation up on import or name the files correctly? are you calling them properly from a script? your post was just too vague for anyone to know and most folks here aren't using dim.
     
  4. Sam Shiels

    Sam Shiels

    Joined:
    Feb 25, 2007
    Posts:
    160
    I just made a model, impoted it to Unity and named the animations correctly.
     
  5. pete

    pete

    Joined:
    Jul 21, 2005
    Posts:
    1,647
    if you can see your animations in the project view they probably came in correctly. try doing something simple like:

    Code (csharp):
    1.  
    2. function Update ()
    3. {
    4.     if (Input.GetAxis("Horizontal"))
    5.     {
    6.         animation.Play("animation1", PlayMode.StopAll);
    7.     }
    8.  
    9.     else if (Input.GetAxis("Vertical"))
    10.     {
    11.         animation.Play("animation2", PlayMode.StopAll);
    12.     }
    13.  
    14.     else
    15.     {
    16.         animation.Play("idle", PlayMode.StopAll);
    17.     }
    18. }
    change idle, animation1 and 2 to your animation names. the script will play animation1 on hitting the left/right arrows and animation2 on the up/down arrows. otherwise it will play idle.

    see the script ref too...
    http://unity3d.com/Documentation/ScriptReference/Animation.html
     
  6. Sam Shiels

    Sam Shiels

    Joined:
    Feb 25, 2007
    Posts:
    160
    I know that. It seems to play half of the animation then it loops.
     
  7. Alpha-Loup

    Alpha-Loup

    Joined:
    Jun 23, 2006
    Posts:
    797
    I encountered similar problems when exporting to fbx from Cinema 4D R9.1 and R10.0. There were some bugfixes and improvements made to the exporter in R10.1 and now it works flawless... maybe you got an fbx-export problem, too?

    Maybe you can try an export from the newest version of blender, just as a test?!
     
  8. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    The .fbx exporter in Blender doesn't do animation....

    --Eric