Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. The 2023.1 beta is now available for testing. To find out what's new, have a look at our 2023.1 feature highlights.
    Dismiss Notice

Bug with Crossfade + CrossfadeInFixedTime ? (animator)

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

  1. hippocoder

    hippocoder

    Digital Ape Moderator

    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 Moderator

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

    IllTemperedTunas

    Joined:
    Aug 31, 2012
    Posts:
    368
    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 Moderator

    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,045
    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.