docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Cinemachine Target Group

    Use Cinemachine Target Group to treat multiple GameObjects as a single Tracking target. It can also be used as targets for procedural behaviour that needs to know the size of the target, for example the Group Framing extension.

    To create a Target Group:

    1. Add a CinemachineTargetGroup component to an empty GameObject.

    To create a CinemachineCamera with a Target Group:

    1. In the Unity menu, choose GameObject > Cinemachine > Target Group Camera.
      Unity adds a new CinemachineCamera and Target Group to the Scene. The Follow and Look At targets in the CinemachineCamera refer to the new Target Group.

    To convert an existing CinemachineCamera target to a target group:

    1. Select Convert to TargetGroup from the popup menu to the right of the Tracking Target field in the CinemachineCamera inspector

    To Populate a Target Group:

    1. In the Hierarchy, select the new Target Group object.
    2. In the Inspector, click the + sign to add a new item to the group.
    3. In the new item, assign a GameObject (you can drag and drop from the Hierarchy), and edit the Weight and Radius properties.
    4. To add more GameObjects to the Target Group, repeat steps 2-3.

    Cinemachine Target Group with two targets

    Properties:

    Property: Function:
    Position Mode How to calculate the position of the Target Group.
    Group Center Use the center of the axis-aligned bounding box that contains all items of the Target Group.
    Group Average Use the weighted average of the positions of the items in the Target Group.
    Rotation Mode How to calculate the rotation of the Target Group.
    Manual Use the values specified in the Rotation properties of the Target Group’s transform.
    Group Average Weighted average of the orientation of the items in the Target Group.
    Update Method When to update the transform of the Target Group.
    Update Update in the normal MonoBehaviour Update() method.
    Fixed Update Updated in sync with the Physics module, in FixedUpdate().
    Late Update Updated in MonoBehaviour LateUpdate().
    Targets The list of target GameObjects.
    Weight How much weight to give the item when averaging. This cannot be negative.
    Radius The radius of the item, used for calculating the bounding box. This cannot be negative.
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)