Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Changes to follow targets

Discussion in 'Cinemachine' started by PDS-Mike, Jul 31, 2023.

  1. PDS-Mike

    PDS-Mike

    Joined:
    Jul 18, 2022
    Posts:
    5
    What I want to do is have the camera follow the player but look at something else. This was easily done in the older cinemachine but after upgrading to 3.0, I can't find a way to have these be separate as follow and lookat are now combined into tracking target. How can I use it like the old way?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,267
    upload_2023-7-31_18-5-9.png
     
    PDS-Mike likes this.
  3. PDS-Mike

    PDS-Mike

    Joined:
    Jul 18, 2022
    Posts:
    5
    I somehow missed that little button. Thanks very much!
     
    Gregoryl likes this.
  4. PDS-Mike

    PDS-Mike

    Joined:
    Jul 18, 2022
    Posts:
    5
    A follow up question. If the lookat target is a target group, the group framing composer shows a warning that the tracking target must be a target group. However, if I set rotation control to none and add the component and change the settings it still appears to work mostly how I want it to, with some bad swing rotations. I have the tracking target as the player and the lookat set to the target group.

    To be more specific about what I'm trying to do, it's a lock on camera, the type like in Zelda or Dark Souls, where the camera is behind the player but the player and nearby enemies are all kept in the shot. The warnings make me think I'm doing this in an unintended way. Is this the correct approach?
     
  5. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,267
    You can ignore the warning, it's incorrectly displayed in this case (we will fix that problem). The GroupFraming will work if either the LookAt target or the Tracking target is a group. You can tell it's working because the GameView will show a yellow circle indicating the group diameter in the camera view.

    upload_2023-8-3_10-7-6.png

    I have the camera set up like this:

    upload_2023-8-3_10-7-40.png
     
    PDS-Mike likes this.