Search Unity

Problem with transitions

Discussion in 'Animation' started by Benjamin Magnus, Sep 20, 2013.

  1. Benjamin Magnus

    Benjamin Magnus

    Joined:
    May 23, 2013
    Posts:
    40
    Im in the process of making my game more complex by finally getting mecanim involved in animations, but Ive hit a little snag. Im starting simple, with a turret that fires on any enemy in range. It only has a handful of animations, for example its Idle where its barrels just gently swing back and forth, and its main firing animation, where the barrels rotate fairly quickly. Pretty simple set up, has a boolean set up so that if it has a target, itll transition from Idle to Firing.

    The problem is with editing the transition to my liking. My Idle clip is 9 seconds long, the Firing clip is 2 seconds long, but if I make ANY changes to the transition, the animation loops after 1 second. Itll play through the entire clips right after I create a transition, but any editing what so ever will cause the 1 second loop. Changes conditions, dragging any of the sliders, checking or unchecking "Atomic". Anything. Now Im very new to the system, Ive gone along with the tutorial and watched a few videos, and never came across this before. So I do not know its its a little bug, or if Im doing something wrong. Any assistance would be greatly appreciated.
     
  2. bluescrn

    bluescrn

    Joined:
    Feb 25, 2013
    Posts:
    642
    This is an editor bug introduced in 4.2, and still present in 4.2.1 (It was fine before 4.2, but seems 100% reproducable since)

    I reported it as a bug ( Case 555208 ) a few days after 4.2 was released.

    It's very annoying, but can be worked around to some extent by deselecting and reselecting the transition every time you change anything.

    (I'm surprised that I've not seen more posts about it. I guess that hints at the fact that most people are using the 'legacy' animation system rather than Mecanim?)
     
    Last edited: Sep 30, 2013
  3. bluescrn

    bluescrn

    Joined:
    Feb 25, 2013
    Posts:
    642
    (oops, double post - forum is very slow from here at the moment...)
     
  4. Benjamin Magnus

    Benjamin Magnus

    Joined:
    May 23, 2013
    Posts:
    40
    I am so glad that it is indeed a bug. I literally spent three days trying to figure out what I was doing wrong. I ran into it while trying to learn how to use Mecanim for controlling my turrets in a tower defense game (to replace my rudimentary faux-animations, just changing different objects, position and rotation). I was almost tearing my hair out, because I am still learning the system it didnt dawn upon me for days that it was a bug, I just figured I was using it wrong, or my models were messed up, or my animations werent recorded right, or my armatures were set up wrong. Thank you so much for letting me know, it is much appreciated.