Search Unity

Switch LookAt Target

Discussion in 'Cinemachine' started by Imperatoss, Sep 8, 2019.

  1. Imperatoss

    Imperatoss

    Joined:
    Mar 24, 2018
    Posts:
    28
    Hey,

    i´m switching between LookAt Targets at runtime in a simple cinemachine virtual Camera, with some LookAhead time. I have like 10 Objects in a row. If i switch to an Object, which is on the right side of the actual LookAt Target, the camera is hard cutting and rotating from the other side, i switch to the next object on the right side, but the Camera fades in not clockwise.
    I dont want to use 10 differenct virtual Cameras with ease in blend effect.
    Can someone help me???
     
    Last edited: Sep 8, 2019
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    2,844
    If you change the target of a vcam it will snap to the new position.

    Instead of changing the target, you can make an invisible gameObject that tracks the real target. Use the invisible object as the vcam target. When you want to change real targets, lerp the invisible object to the new position and begin tracking the new object.
     
  3. Imperatoss

    Imperatoss

    Joined:
    Mar 24, 2018
    Posts:
    28
    Thank you very much Gregoryl for the fast and competent answer. I already thought about multiple Cameras which would have produced a huge overhead. =) I´ll give it a try