Class CinemachineCameraOffset
An add-on module for Cm Camera that adds a final offset to the camera
Inheritance
Inherited Members
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 |
---|---|
Cinemachine |
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 |
---|---|---|
Cinemachine |
vcam | The virtual camera being processed |
Cinemachine |
stage | The current pipeline stage |
Camera |
state | The current virtual camera state |
float | deltaTime | The current applicable deltaTime |