Class CinemachineCameraOffset
An add-on module for Cinemachine Virtual Camera that adds a final offset to the camera
Inheritance
CinemachineCameraOffset
Inherited Members
Namespace: Global Namespace
Syntax
[AddComponentMenu("")]
[ExecuteAlways]
[HelpURL("https://docs.unity.cn/Packages/com.unity.cinemachine@2.8/api/Cinemachine.CinemachineCameraOffset.html")]
public class CinemachineCameraOffset : CinemachineExtension
Fields
m_ApplyAfter
When to apply the offset
Declaration
[Tooltip("When to apply the offset")]
public CinemachineCore.Stage m_ApplyAfter
Field Value
Type | Description |
---|---|
CinemachineCore.Stage |
m_Offset
Offset the camera's position by this much (camera space)
Declaration
[Tooltip("Offset the camera's position by this much (camera space)")]
public Vector3 m_Offset
Field Value
Type | Description |
---|---|
Vector3 |
m_PreserveComposition
If applying offset after aim, re-adjust the aim to preserve the screen position of the LookAt target as much as possible
Declaration
[Tooltip("If applying offset after aim, re-adjust the aim to preserve the screen position of the LookAt target as much as possible")]
public bool m_PreserveComposition
Field Value
Type | Description |
---|---|
Boolean |
Methods
PostPipelineStageCallback(CinemachineVirtualCameraBase, CinemachineCore.Stage, ref CameraState, Single)
Applies the specified offset to the camera state
Declaration
protected override void PostPipelineStageCallback(CinemachineVirtualCameraBase vcam, CinemachineCore.Stage stage, ref CameraState state, float deltaTime)
Parameters
Type | Name | Description |
---|---|---|
CinemachineVirtualCameraBase | vcam | The virtual camera being processed |
CinemachineCore.Stage | stage | The current pipeline stage |
CameraState | state | The current virtual camera state |
Single | deltaTime | The current applicable deltaTime |