Search Unity

how does character movement happen?

Discussion in 'Animation' started by VataRaven, Sep 15, 2013.

  1. VataRaven

    VataRaven

    Joined:
    May 24, 2013
    Posts:
    180
    Do I make a looped motion file of the moves I want or something else?

    Like, I have walking mo-cap files, would I just clean them up and loop them for use?

    I"m not sure what I'm doing
     
  2. greatUnityGamer

    greatUnityGamer

    Joined:
    Aug 11, 2013
    Posts:
    182
    What do you mean?

    Well character movement happens by movement in some direction.
    Or by animations of skeleton based characters, like humans doing stuff moving from pose to pose.

    You import animations into unity by FBX files.

    ONe for each animation you want, OR you can string bunch of animations in one FBX and then in Unity you can split them in the inspector tab. by selecting the range of each.


    If you use multiple animations fbx, then i found the trick to get them accessible in scripting.
    You have to name them

    like
    player.fbx
    player@idle.fbx
    player@walk.fbx

    Then you Make them Legacy.

    then you load the player.fbx model( no animation) into the viewport.
    then but before that you make all your imports to be legacy.

    Anyways, then then load your player.fbx. Then to add animations to it, you just increase the SIZE of the animations in that objects inspector tab. to match the number of animations you have.

    Then you drag each of the animations into the created fields.
    And that's it now all those are accessible by name in scripting.

    like this:
    animation.play( "idle") or animation.play("walk")

    ***
    Well another thing you asked about was clean them up and loop them? Well yes of course you want to clean them.
    ANd if you want looping animations of course you want looped animations.

    To make looped animations it might be easy in your package if you have good interpolation. IN DAZ it's trick unless it's a short 30 frame anim.
    by you just Do the same pose at begin frame and end frame and then one different pose in the middle.
     
  3. VataRaven

    VataRaven

    Joined:
    May 24, 2013
    Posts:
    180
    ...I didn't really understand much of what you just typed
     
  4. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    2,444
    It's a complicated topic. Search on Google or YouTube for the Unity 4.0 Mecanim tutorial video.

    The short answer to your question is, it depends on what assets you import, what you need to do in Unity to do the rest.
     
  5. VataRaven

    VataRaven

    Joined:
    May 24, 2013
    Posts:
    180
    oh, ok, thanks for the help