Group Framing
This CinemachineCamera extension adds the ability to frame one or more targets when they are members of a CinemachineTargetGroup. It can be used to dynamically adjust the zoom or to move the camera closer to or farther from the targets, to keep them in the frame at the desired size.
For this to work, the CinemachineCamera's Tracking Target must be a CinemachineTargetGroup, with at least one member, and having a nonzero size.
Properties
Property: | Function: | |
---|---|---|
Framing Mode | Specifies the screen dimensions to consider when framing. | |
Horizontal | Consider only the horizontal dimension. Ignore vertical framing. | |
Vertical | Consider only the vertical dimension. Ignore horizontal framing. | |
Horizontal And Vertical | Use the larger of the horizontal and vertical dimensions to get the best fit. | |
Adjustment Mode | How to adjust the camera in depth to get the desired framing. You can zoom, dolly in or out, or do both. | |
Zoom Only | Don’t move the camera, only adjust the FOV. | |
Dolly Only | Move the camera, don’t change the FOV. | |
Dolly Then Zoom | Move the camera as much as permitted by the ranges, then adjust the FOV if necessary to make the shot. | |
Lateral Adjustment | How to adjust the camera horizontally and vertically to get the desired framing. You can change position to reframe, or rotate the camera to reframe. | |
Change Position | Camera is moved horizontally and vertically until the desired framing is achieved. | |
Change Rotation | Camera is rotated to achieve the desired framing. | |
Framing Size | The screen-space bounding box that the targets should occupy. Use 1 to fill the whole screen, 0.5 to fill half the screen, and so on. | |
Center Offset | A nonzero value will offset the group in the camera frame. | |
Damping | How gradually to make the framing adjustment. A larger number gives a slower response, smaller numbers a snappier one. | |
Dolly Range | The allowable range that the camera may be moved in order to achieve the desired framing. A negative distance is towards the target, and a positive distance is away from the target. | |
FOV Range | If adjusting FOV, it will be clamped to this range. | |
Ortho Size Range | If adjusting Orthographic Size, it will be clamped to this range. |