b486678290
Library -Artifacts
2.2 KiB
2.2 KiB
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:
-
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. -
In the Hierarchy, select the new Target Group object.
-
In the Inspector, click the + sign to add a new item to the group.
-
In the new item, assign a GameObject (you can drag and drop from the Hierarchy), and edit the Weight and Radius properties.
-
To add more GameObjects to the Target Group, repeat steps 3-4.
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. 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. |