Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug with Crossfade + CrossfadeInFixedTime ? (animator)

Discussion in '2018.3 Beta' started by hippocoder, Sep 12, 2018.

  1. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Any form of crossfade with in code with a blend tree causes scaling on the rig bones. They all scale up by the amount of the previous so the character becomes tapered with a huge head. To trigger the effect, ensure that there is a proper blend tree, ie locomotion, and just blend to same state once, that will do it.

    animator.CrossFadeInFixedTime(Hash.actorLocomotion, 1f);

    Why would a mesh suddenly scale up in 2018.3 when it did not in 2018.2 - what changed? It does not occur with a clip on a state, just a 2D blend tree. I don't fancy pulling apart my xx gigs project just yet...
     
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
  3. IllTemperedTunas

    IllTemperedTunas

    Joined:
    Aug 31, 2012
    Posts:
    782
    I wonder if it has to do with the animation optimizations, as if Unity decides, oh the animation is set to 1, we don't have to worry about scale, only to default back to 100% scale for a single frame at the very start of the next animation thus breaking scale for any animation or scale that isn't 100%
     
  4. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I tried correcting the effected bones in LateUpdate and it didn't actually work, so that's super odd.
     
  5. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,132
    We have a bug logged that could be behind this behaviour. To be sure, though, could you please submit a bug report + repro?
     
    hippocoder likes this.