Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

"Look At" issue for Dolly Track & Camera

Discussion in 'Cinemachine' started by GookGo, May 18, 2018.

  1. GookGo

    GookGo

    Joined:
    May 5, 2018
    Posts:
    38
    I have an issue with this video tutorial: Unity 2017 - Dolly Track Cinemachine [C#][Tutorial]


    During the recording, the tutorial has multiple objects to change in "Look At" but when I do, I can only have ONE object. The video shows the DollyCamera looks at the spike first and followed with the sign and the fish. When I follow the step, the first one (spike) is fine but when I change to the "sign", the first one (spike) will be changed to the sign as well.

    This is the video I recorded for the issue of dolly track.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,636
    The tutorial is incorrect in suggesting that you can keyframe a target change. It's not a good way to do it. Much better would be to make a second vcam looking at the other target, and blend between the vcams at the right moment, using Timeline Cinemachine Clips. It gives you much more control.

    I would recommend that you stop following that tutorial and follow this one instead:

     
    GookGo likes this.
  3. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,636
    And this one also:

     
  4. GookGo

    GookGo

    Joined:
    May 5, 2018
    Posts:
    38
    Thank you for the advice, Gregoryl! I actually go through the official tutorial and I don't know how to make a particular scene using Cinemachine only so I ended up watching the incorrect tutorial. I need to an animation converting into a clip and combining it with Cinemachine track to use the really cool "blending" feature to switch the camera smoothly. but when I convert the animation (using the CM vcam) into a clip, I couldn't make the clip blend with the Cinemachine track (can't make it blended) . I recorded the process:
     
  5. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,636
    You've created some animation on the vcam itself (path position) and converted it to a clip. Good. Now leave that clip alone, on its animation track. We'll call that clip #1.

    Next, on the CM track, right-click and create a Cinemachine Shot Clip. Drag vcam 1 onto the vcam field in the clip's inspector. That's the vcam1 activation clip. We'll call it clip #2.

    Next, right-click again on the CM track, to create another CM shot clip. Drag vcam2 onto its inspector. We'll call that clip #3.

    So now you have 3 clips:
    1. An animation clip that moves vcam 1 along the path (clip #1)
    2. An activation clip that enables vcam 1 (clip #2)
    3. An activation clip that enables vcam 2 (clip #3)
    You can blend clips #2 and #3, to create smooth transitions between the vcams. Clip #1 is independent and operates on another track. You can create other animation clips, like clip#1, for the other vcam if you want. They don't blend. Only the CM activations clips blend.
     
    GookGo likes this.
  6. GookGo

    GookGo

    Joined:
    May 5, 2018
    Posts:
    38
    Thanks! I follow the instruction and the issue is that the clip2 doesn't work as same as clip1 even though they're the same CM vcam as you can see in the video. If I can make clip2 work as clip1, I think I can blend clip2 and 3.

    In the video, I make it Mute to show that the 2nd track doesn't work but it also doesn't work when I don't mute the 1st track (clip1).

    Is there any possibility that the setting of my Unity caused this? (I don't remember if I change anything tho)

     
  7. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,636
    Your object setup for the cameras is wrong. You need this:

    GameObject 1 (Main Camera):
    - Unity Camera
    - Cinemachine Brain

    GameObject 2 (vcam1):
    - CinemachineVirtualCamera

    GameObject 3 (vcam2):
    - CinemachineVirtualCamera

    GameObjects 1, 2, and 3 are root-level (no nesting inside each other). Only 1 Unity Camera, only 1 brain, and the vcams will control it, even though they are separate game objects. Your CM track in the timeline must bind to the CinemachineBrain (GameObject 1). The clips inside it bind to the vcams.
     
    Last edited: May 18, 2018
  8. GookGo

    GookGo

    Joined:
    May 5, 2018
    Posts:
    38
    Got it. I think this should follow but the cam still doesn't work.
    (My vcam1 and 2 are the exact the same except the Status in Inspector.)

    Screen Shot 2018-05-19 at 12.07.36 AM.png
     
  9. GookGo

    GookGo

    Joined:
    May 5, 2018
    Posts:
    38
    I thought the "Loop" in the dolly track might be an issue so I created another dolly track without checking the Loop but the issue remains the same. The cam of CM vcam-x in the Cinemachine Track doesn't work like the converted clip of CM vcam-x in the Animation track.
     
  10. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,636
    Almost... now just drag the Unity Camera here:

    upload_2018-5-18_12-44-19.png
     
  11. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,636
    And get rid of your other Unity camera, the one called "Camera (1). You should only have 1 Unity camera.
     
  12. GookGo

    GookGo

    Joined:
    May 5, 2018
    Posts:
    38
    Still not working... T_T

    Screen Shot 2018-05-19 at 12.57.10 AM.png
     
  13. GookGo

    GookGo

    Joined:
    May 5, 2018
    Posts:
    38
    I'm so sorry to spend your time on such a beginner issue :( but still can't figure this out. This video should be able to show you the parameter and setting of each game object.
     
  14. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,636
    It looks like it's working.
    The animation of the path position does not play because you've muted it. Unmute it and it will play.
    If you want a smooth transition between the vcams, drag the second vcam clip so that it overlaps the first.
     
  15. GookGo

    GookGo

    Joined:
    May 5, 2018
    Posts:
    38
    Yes, it is moving now but it's not working like it's supposed to... The behavior should be as same as the converted clip but it's not. Few seconds of this video might explain better.

     
  16. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,636
    turn off the composer damping in the vcam
     
    GookGo likes this.
  17. GookGo

    GookGo

    Joined:
    May 5, 2018
    Posts:
    38
    Finally!! Can't thank you enough for the patience and advice, Gregoryl! Really appreciate it!! :):)
     
    Gregoryl likes this.