Search Unity

Timeline Bug(i think): scale of model issue.

Discussion in 'Timeline' started by TimmyTheTerrible, Jul 25, 2017.

  1. TimmyTheTerrible

    TimmyTheTerrible

    Joined:
    Feb 18, 2017
    Posts:
    186
    Sent this bug off via the bug reporter...then thought, maybe i'm just missing something.

    Create a timeline of a character using root motion. Doesn't have to do anything special, just walking. Now duplicate the timeline, and the character. drag the duplicated character into the duplicated timeline, and scale the new character down quite a bit. Click play. The small character will move at exactly the same speed as the larger character, which shouldn't be the case with root motion(don't have this problem with mecanim animators). Its as if the character isn't getting its scaling transformation from the scene until after the animations have been applied by timeline, except the velocity of the root motion isn't scaled to match.
     
    TheUsername likes this.
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Thanks for submitting that bug, that is definitely incorrect behaviour. We will look into it asap.
     
    TheUsername likes this.
  3. TimmyTheTerrible

    TimmyTheTerrible

    Joined:
    Feb 18, 2017
    Posts:
    186
    Thanks for making an awesome tool like timeline for me to tinker with!
     
    TheUsername and julienb like this.
  4. codegasm

    codegasm

    Joined:
    May 3, 2015
    Posts:
    38
    I am using negative scale in order to flip my 2D sprite animations. In my case this bug causes the root motion to completely ignore the scale. Hopefully this helps with identifying and fixing the issue.

    Is there any kind of workaround at this point?
     
  5. Jeff-Rosenberg

    Jeff-Rosenberg

    Joined:
    Oct 23, 2012
    Posts:
    26
    Is there any update on this? Is there a workaround? This is blocking us right now. Our boss character can't use scaled root motion during a cutscene. Even scaling the animation in the import settings doesn't work, despite the root motion telling us it should be moving at the right average velocity.

    Edit: Found a workaround for now. Using the Transform Tween Playable from the Default Playables assets lets us put in a tween between two Transforms to override the root motion of the animation. Since the animation will take over the position after the animation ends, the clip is split in half. The first half does the motion, the second half is at the end of the motion to "lock" the character back in place. Really gross and hacky but it works for now.

     
    Last edited: Mar 23, 2018
    TheUsername likes this.
  6. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Unfortunately there isn't an update on that bug, it's still being worked on with other root motion related issues.
     
    TheUsername likes this.
  7. Jeff-Rosenberg

    Jeff-Rosenberg

    Joined:
    Oct 23, 2012
    Posts:
    26
    An update to my workaround, it doesn't work in play mode :(

    Is there anything else I can try? I'm thinking I can create a custom TimelinePlayable (or whatever they're called) and feed it an AnimationClip, then have that apply the root motion over top of my other animations. Does that sound like it'd work?

    Edit: I'd still like to see if there's a better way to work around this, but I found a solution that does work in both play and edit mode. By creating a second Animation Track and calculating the amount of root motion I need (in my case, +5.8139m in the Z axis over 65 frames) and converting to a Clip Track I was able to create a new animation with just my root motion. Placing this underneath my main track makes it override the motion of the base one, which for some reason wasn't working with the Transform Tween Track I mentioned earlier (the higher priority of the tween track was ignored in play mode). I then moved the Root Motion Track Offset back to where it needed to be.

     
    Last edited: Mar 27, 2018
    TheUsername likes this.
  8. TheUsername

    TheUsername

    Joined:
    Apr 28, 2015
    Posts:
    3
    Yes, I spent a lot of time looking into what's causing this strange behavior, lastly I realized it is scale related.
    The Timeline tool is a really great feature though... Hopefully this will be fixed soon...
     
    Last edited: Apr 21, 2018
  9. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    A fix for this, along with a batch of other root motion fixes and improvements will arrive in 2018.3.
     
    YvesAlbuquerque likes this.