Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

Timeline Walk along Path

Discussion in 'Timeline' started by namdo, Oct 11, 2021.

  1. namdo

    namdo

    Joined:
    Feb 23, 2015
    Posts:
    197
    Hi,

    So I just started using timeline and im enjoying it. However Im stuck here.

    Is it possible to have a character walk along a path? Because when I try to record a path using an override animation clip, the position resets to 0,0,0 and its kind of messed up.
     
    Last edited: Oct 11, 2021
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    8,716
    The solution was to have dual animation channels for the character (one for the movement and another for the actual character animation), but the workflow is a mess.

    Find another solution.
     
  3. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    233
    I have tried a few approaches. One was to not have root motion on the character (so the animation clip has the character walking in place). I then put a container object around the character and dropped that into a Dolly Cart from Cinemachine. A dolly track is a spline with speed etc, so you could use the dolly track to move the "cart" around, then put you character in that cart.

    My final approach for my own problem was to give up on it. I am recording *short* animation clips into video files - I edit the files together for the final solution. I found it just easier to use root motion to move the character. You have to set "Track Offsets" to "apply scene offsets" (otherwise it goes back to 0,0).
    upload_2021-10-22_10-41-58.png

    Also you can set a second clip to match the offsets of a previous clip which is important to chain different clips (e.g. walk then idle) at times (otherwise the character goes back to the start of the clip position!). But I still found it easier to make natural looking walks - no ice skating.

    upload_2021-10-22_10-44-37.png

    There may be better ways with IK Foot etc, I just did not work out how yet. I just use animation clips, play with the clip playback speed, and the above and it has been good enough for me.
     
    AcidArrow likes this.
unityunity