Mesh Blend issue

Hi guys,

im new to unity,

im having some issues with blending one animation into the next. i have a basic idle, and a walk cycle but it seems to get stuck mid-animation when i let go of the UP key.

my idle animation frames are at 1 - 25
and my walk is 30 - 100

can someone please take a look at the attached file and tell me what im doing wrong.

thank guys!

706606–25458–$guy.unitypackage (44.7 KB)

are you using Crossfade?

hi Willc,

the only code i have on my character is the following:

function Update ()

{

   if (Input.GetAxis("Vertical") > 0.2)

       animation.CrossFade ("walk");

   else

      animation.CrossFade ("idle");

}

any ideas?

hmm , not really based on that code, theres nothing wrong with that script, im thinking it has something more to do with the animation , or the animation settings.

i thought the same,

Im working in 3DS MAX, does my exported FBX file need to have certain settings in place?

when i save out i do the following:

IN MAX:

  1. created a basic model with basic animation (i have tried with a sphere and also tried with bones)
  2. experted as .FBX file with the following FBX File settings:
  • Animation : yes
  • Bake animation : yes
  • Deformations (skin morphs) : yes
  1. clicked save

IN UNITY

  1. Dragged fbx file into assets
  2. highlighted model in the assets window and i have these settings:
  • Animation : yes
  • Mesh compression : off
  • generated colliders : off
  • swap UV’s " off
  • Generate lightmap UV’s : off
  • Normals : Import
  • Tangents : Calculate
  • Split Tangents : yes
  • Materials Generation : Per texture
  • Animations generation : Store in root
  • Animation wrap mode : default
  • Split Animations : yes
  1. added a new animation with the (+) called idle (1-25) with wrap mode of loop

  2. added a new animation with the (+) called walk (30-100) with wrap mode of loop

  3. pressed apply button

  4. dragged into scene

  5. clicked on my model in Hierarchy and turned off Play automatically setting

  6. dragged script onto model

is there anything else i should have done?

thanks so much for your help

It doesn’t appear you have any keyframes on your idle animation.

I just quickly tested with your unity package and if you add two keys into the animation clip it blends back to idle correctly.