Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Adding relative rotation to root motion clips in timeline

Discussion in 'Timeline' started by Joshua_strawchildgames, Jan 21, 2019.

  1. Joshua_strawchildgames

    Joshua_strawchildgames

    Joined:
    May 27, 2017
    Posts:
    60
    Hey folks, I've been working on creating a VVS (visual vertical slice) so I'm relying on the timeline to put together the animations in my scene. However I have a few problems.

    If I use the in-place animations, I have more control on the direction and distance traveled the character does, but it looks completely unnatural with varying speed between intervals. So I thought to use just the root motion versions of the animations.

    Using root motion, I'm able to get very consistent speeds and animations since the distance and rotation is baked into the animation. However I have a problem for when I need to turn the animations (such as a corner). I can add a new animation track, applying y rotation offset and blend the offsets, but it looks pretty bad and sometimes it makes the speeds inconsistent.

    I was hoping there would be a way to influence but not set the rotation of the character in the timeline, but there doesn't seem to be one. I tried making a script that applies offset to the characters rotation, but it doesn't work in the timeline (it pretty much ignores it, although it works in play mode).

    So I just wanted to ask you folks if you knew of a way to do relative rotation changes in the middle of root motion animations without the need to set rotation every time.
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,318
    Are you using OnAnimatorMove() to do that, and does your script have [ExecuteInEditMode] applied?
     
  3. Joshua_strawchildgames

    Joshua_strawchildgames

    Joined:
    May 27, 2017
    Posts:
    60
    {ExecuteInEditMode] is applied, but I am not using OnAnimatorMove()! I'll try that, Thanks!
     
  4. Joshua_strawchildgames

    Joshua_strawchildgames

    Joined:
    May 27, 2017
    Posts:
    60
    Sorry for the delay on this. I tried this and unfortunately this doesn't work. Thanks for the suggestion though.
     
  5. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,318
    That's too bad. You could try to use a recorded clip on an override track to modify just the problematic section. Remove the extrapolation and use the ease in/out methods.

    upload_2019-1-28_8-5-26.png
     
unityunity