Firstborn/Library/PackageCache/com.unity.cinemachine@2.8.9/Documentation~/CinemachineTargetGroup.md
Schaken-Mods b486678290 Library -Artifacts
Library -Artifacts
2023-03-28 12:24:16 -05:00

2.2 KiB
Raw Blame History

Cinemachine Target Group

Use Cinemachine Target Group to treat multiple GameObjects as a single Look At target. Use a Target Group with the Group Composer algorithm.

To create a Virtual Camera with a Target Group:

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

  2. In the Hierarchy, select the new Target Group object.

  3. In the Inspector, click the + sign to add a new item to the group.

  4. In the new item, assign a GameObject (you can drag and drop from the Hierarchy), and edit the Weight and Radius properties.

  5. To add more GameObjects to the Target Group, repeat steps 3-4.

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 Groups transform. This is the recommended setting.
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. Cannot be negative.
Radius The radius of the item, used for calculating the bounding box. Cannot be negative.