Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. 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

Help Wanted Timeline Character model snaps back to its default start position instead of moving forward

Discussion in 'Cinemachine' started by Rakesh_Rakkeeyy, Jul 29, 2020.

  1. Rakesh_Rakkeeyy

    Rakesh_Rakkeeyy

    Joined:
    Oct 12, 2019
    Posts:
    3
    Hi sir, I am working with the cine machine timeline feature in Unity 2019.3.12f1. I have a character model with walk animation. When I added that to my timeline, the character model snaps back to the default start position after playing the walk animation instead of moving forward. I have enabled loop in the walk animation and dragged the animation in timeline so it automatically loops. But my character model does not move forward. It loops from the default start position. Please help.
     
  2. yanghai

    yanghai

    Unity Technologies

    Joined:
    Mar 30, 2015
    Posts:
    12
    Hi, once the clip has the Loop option enabled, you can extend the clip (drag edge)... you will see L1, L2... and your character should keep moving forward during these loops.
    LoopClip.png
     
  3. Rakesh_Rakkeeyy

    Rakesh_Rakkeeyy

    Joined:
    Oct 12, 2019
    Posts:
    3
    Hi sir, Please check the attachment. I've already extended the clip. But the player does not move forward. He keeps snapping back to the start position.
     

    Attached Files:

  4. yanghai

    yanghai

    Unity Technologies

    Joined:
    Mar 30, 2015
    Posts:
    12
    Probable because you don't have root motion (root with displacement curves).
    Is your character Humanoid or Generic?
    Can you select your character fbx file in the project folder and give me a screenshot of your Importer > Rig tab?
     
  5. Rakesh_Rakkeeyy

    Rakesh_Rakkeeyy

    Joined:
    Oct 12, 2019
    Posts:
    3
    Hi sir, My character is generic. I've attached a screenshot of the Rig tab. I have an animator component attached to my character but has no animator controller. "APPLY ROOT MOTION" is already toggled on in the animator component. Please tell me how to enable root motion.
     

    Attached Files:

    Last edited: Jul 30, 2020
  6. yanghai

    yanghai

    Unity Technologies

    Joined:
    Mar 30, 2015
    Posts:
    12
    Assuming the displacement of your character is on the hips or pelvis of your character...
    In the Rig tab, select the hips joint of your character in the "Root node" pull-down and click apply.

    This is basically telling the rig where to find the displacement animation of your character because this can differ depending on your character hierarchy.
     
    Last edited: Jul 30, 2020
unityunity