Class CinemachineCameraOffset
An add-on module for Cm Camera that adds a final offset to the camera
Inheritance
CinemachineCameraOffset
Inherited Members
Component.GetComponentIndex()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate(Object, Scene)
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: Unity.Cinemachine
Assembly: Unity.Cinemachine.dll
Syntax
[AddComponentMenu("Cinemachine/Procedural/Extensions/Cinemachine Camera Offset")]
[ExecuteAlways]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.cinemachine@3.1/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 |
---|---|
bool |
Methods
PostPipelineStageCallback(CinemachineVirtualCameraBase, Stage, ref CameraState, float)
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 |
float | deltaTime | The current applicable deltaTime |