Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Timeline Different in preview mode and in play mode.

Discussion in 'Timeline' started by witcher101, Mar 11, 2020.

  1. witcher101

    witcher101

    Joined:
    Sep 9, 2015
    Posts:
    516
    The position of my char seems to be different in preview mode in timeline and in play mode. I am using root motion driven animations. I am using apply scene offset as Track offset option.
    Dont know why this bug is happening
     
  2. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Scene offset means the character will start from their current position/rotation. The editor uses the value in the scene, but in playmode it could be different due to a script, physics, animator controller, etc...
     
  3. witcher101

    witcher101

    Joined:
    Sep 9, 2015
    Posts:
    516
    I dont have any physics or scripts and my animator controller is none. I have only ticked to use root motion. However postion and rotate of some animation seems to differ in playmode and in preview mode, even though they should be same
     
  4. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    If you don't play the timeline, are the position and rotation still different? That will make sure it's a timeline problem.

    There are a couple other possibilities I can think of that might cause this behaviour
    • There are multiple animation tracks targeting the same object. (Preview and Playmode handle that differently)
    • An offset on the first clip? (I'm not sure about this tbh)
    • Anything else that modifies root motion, like OnAnimatorMove()
     
  5. witcher101

    witcher101

    Joined:
    Sep 9, 2015
    Posts:
    516
    Ok the so problem disappears if i check bake in to pose option and root transform rotation based on original in animation option. Which means timeline isnt properly previewing animation based on its settings
     
  6. unknownbuddy

    unknownbuddy

    Joined:
    May 20, 2019
    Posts:
    2
    but by
    but by doing that the transform is not changing according to the animation