Search Unity

Question Dolly Track always prioritizing closest point by Z-axis.

Discussion in 'Cinemachine' started by Telephantasm, Jun 15, 2020.

  1. Telephantasm

    Telephantasm

    Joined:
    Sep 28, 2018
    Posts:
    14
    Hello everyone,
    I have been using cinemachine for a 2.5D game and have encountered a problem when using the dolly track in a trigger activated zone. Everything seems to be working fine when all the points on a dolly track have the same Z-axis value.
    However, when I want the point to be closer by Z-axis, the virtual camera seems to always stay in the closest point towards the follow target no matter where the target moves alongside the track.

    Is this the correct behavior or am I doing something wrong?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,728
    Are you using Auto-dolly?

    upload_2020-6-15_9-13-35.png

    This algorithm will attempt to place the vcam at the point on the path that is the closest to the target. The distance calculation is made in 3D. If this algorithm is not appropriate for your needs, then you should turn this feature off and position your vcam on the track using a more suitable algorithm. You can do that with a custom behaviour on the vcam that manipulates trackedDolly.m_PathPosition.
     
  3. Telephantasm

    Telephantasm

    Joined:
    Sep 28, 2018
    Posts:
    14
    Thanks, it was one of the options I had been considering. Will try this!
     
    Gregoryl likes this.