Search Unity

Cinemachine DollyCart not working when position is animated in Timeline

Discussion in 'Cinemachine' started by sergiobd, Aug 5, 2020.

  1. sergiobd

    sergiobd

    Joined:
    May 14, 2014
    Posts:
    37
    Hi,

    I'm animating the movement of a GameObject (not a virtual camera) with a DollyCart and a Cinemachine path.
    I'm animating the Position parameter of the dolly cart in the timeline, and it seems to work just fine in the editor. However, in Play Mode my object does not move. It jumps to the end of the path once timeline is finished.
    I can make the object follow the path if it I disable the timeline and just use the speed parameter, but this is not what I want as I need to control explicitly the position along the path.
    I'm using Cinemachine 2.6

    upload_2020-8-5_11-7-33.png
     
  2. sergiobd

    sergiobd

    Joined:
    May 14, 2014
    Posts:
    37
    I think I got it. I have to set the Update method to LateUpdate. Right?
     
  3. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,724
    LatUpdate in this case is a good idea because Timeline does its stuff sometime between Update and LateUpdate, and you want the position to get processed by the cart after timeline sets it.