Search Unity

Mecanim: No Blended & smooth crossfaded Transition In a Particular Case...

Discussion in 'Animation' started by SLASH24, Feb 19, 2019.

  1. SLASH24

    SLASH24

    Joined:
    Sep 20, 2012
    Posts:
    144
    hello there,

    my name is Adjo,

    I have noticed a small issue, with mecanim transitions, while I was working extensively
    with animations in my unity related projects...

    here is the scoop:

    no blend and crossfade gradually between state and blendtrees !

    normally, when you enter a State from another state, then you can specify that the animations are blended together and then transition gradually and smoothly from first to next...

    it works in some cases... but not in a particular case:
    if we go from a normal state ( without blend tree) to a state featuring a blend tree:
    Then the animations won't crossfade gradually nor smoothly during transition.

    Instead, it will append the next pose instantly, not smoothly at all ! it's currently anoying me !

    This is pretty much an unwanted situation & result, as you might want to have everything smooth and correct !
    And it is hard to work around this !

    try it yourself to see it !

    what do you guys/girls think ?
    did I explained well?
    have you noticed the same ?


    I think unity3d technologies should address that thing one day, because there's no reason to not blend and crossfade gradually between state and blendtrees !

    give your opinion please !
    any solution, methods to work around this ????
     
    Last edited: Feb 19, 2019
  2. KiddUniverse

    KiddUniverse

    Joined:
    Oct 13, 2016
    Posts:
    115
    are you basing your blend tree on a flat value? when you set the float in your script, you can set parameters so that it will blend. like this SetFloat(string name, float value, float dampTime, float deltaTime);

    edit: if you only set the first two parameters, it will accept them, but it won't blend at all, it will just snap to the value. this is probably your problem.
     
  3. SLASH24

    SLASH24

    Joined:
    Sep 20, 2012
    Posts:
    144

    hello, THANKS ,
    yes this could help me, I didn't knew about that function...
    I've read the manual but I didn't understand how to make it work for me:
    -because I don't know what values to put in the parameters, I've already tried unsuccessfully...
    -DampTime I'm not sure how it works, which are good values for it ....

    I need further help please.
     
  4. KiddUniverse

    KiddUniverse

    Joined:
    Oct 13, 2016
    Posts:
    115
    ("FloatName", 10, .05f, Time.deltaTime); the ten is just a random value i threw in for an example. this will set the float to ten in .05 seconds.

    edit: to confirm, it will gradually reach 10 in .05 seconds. think about it like a transition length.