Class CinemachineTargetGroup
Defines a group of target objects, each with a radius and a weight. The weight is used when calculating the average position of the target group. Higher-weighted members of the group will count more. The bounding box is calculated by taking the member positions, weight, and radii into account.
Inheritance
Namespace: Cinemachine
Syntax
[DocumentationSorting(DocumentationSortingAttribute.Level.UserRef)]
public class CinemachineTargetGroup : MonoBehaviour
Fields
m_PositionMode
How the group's position is calculated
Declaration
public CinemachineTargetGroup.PositionMode m_PositionMode
Field Value
Type | Description |
---|---|
CinemachineTargetGroup.PositionMode |
m_RotationMode
How the group's orientation is calculated
Declaration
public CinemachineTargetGroup.RotationMode m_RotationMode
Field Value
Type | Description |
---|---|
CinemachineTargetGroup.RotationMode |
m_Targets
The target objects, together with their weights and radii, that will contribute to the group's average position, orientation, and size
Declaration
public CinemachineTargetGroup.Target[] m_Targets
Field Value
Type | Description |
---|---|
CinemachineTargetGroup.Target[] |
m_UpdateMethod
When to update the group's transform based on the position of the group members
Declaration
public CinemachineTargetGroup.UpdateMethod m_UpdateMethod
Field Value
Type | Description |
---|---|
CinemachineTargetGroup.UpdateMethod |
Properties
BoundingBox
The axis-aligned bounding box of the group, computed using the targets positions and radii
Declaration
public Bounds BoundingBox { get; }
Property Value
Type | Description |
---|---|
Bounds |
IsEmpty
Return true if there are no members with weight > 0
Declaration
public bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
GetViewSpaceBoundingBox(Matrix4x4)
The axis-aligned bounding box of the group, in a specific reference frame
Declaration
public Bounds GetViewSpaceBoundingBox(Matrix4x4 mView)
Parameters
Type | Name | Description |
---|---|---|
Matrix4x4 | mView | The frame of reference in which to compute the bounding box |
Returns
Type | Description |
---|---|
Bounds | The axis-aligned bounding box of the group, in the desired frame of reference |