Class CinemachineCameraOffset
An add-on module for Cm Camera that adds a final offset to the camera
Inheritance
CinemachineCameraOffset
Inherited Members
UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
UnityEngine.Object.FindObjectsByType<T>(UnityEngine.FindObjectsInactive, UnityEngine.FindObjectsSortMode)
UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
UnityEngine.Object.FindFirstObjectByType<T>()
UnityEngine.Object.FindAnyObjectByType<T>()
UnityEngine.Object.FindFirstObjectByType<T>(UnityEngine.FindObjectsInactive)
UnityEngine.Object.FindAnyObjectByType<T>(UnityEngine.FindObjectsInactive)
Namespace: Unity.Cinemachine
Syntax
[AddComponentMenu("Cinemachine/Procedural/Extensions/Cinemachine Camera Offset")]
[ExecuteAlways]
[HelpURL("https://docs.unity.cn/Packages/com.unity.cinemachine@3.0/manual/CinemachineCameraOffset.html")]
public class CinemachineCameraOffset : CinemachineExtension
Fields
ApplyAfter
When to apply the offset
Declaration
[Tooltip("When to apply the offset")]
[FormerlySerializedAs("m_ApplyAfter")]
public CinemachineCore.Stage ApplyAfter
Field Value
| Type | Description |
|---|---|
| CinemachineCore.Stage |
Offset
Offset the camera's position by this much (camera space)
Declaration
[Tooltip("Offset the camera's position by this much (camera space)")]
[FormerlySerializedAs("m_Offset")]
public Vector3 Offset
Field Value
| Type | Description |
|---|---|
| Vector3 |
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")]
[FormerlySerializedAs("m_PreserveComposition")]
public bool 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 |