Class CinemachineTransposer
This is a deprecated component. Use CinemachineOrbitalFollow instead.
Inheritance
Inherited Members
Namespace: Unity.Cinemachine
Assembly: Unity.Cinemachine.dll
Syntax
[Obsolete("CinemachineTransposer has been deprecated. Use CinemachineFollow instead")]
[AddComponentMenu("")]
[CameraPipeline(CinemachineCore.Stage.Body)]
public class CinemachineTransposer : CinemachineComponentBase
Fields
m_AngularDamping
How aggressively the camera tries to track the target's orientation. Small numbers are more responsive. Larger numbers give a more heavy slowly responding camera.
Declaration
[Range(0, 20)]
[Tooltip("How aggressively the camera tries to track the target's orientation. Small numbers are more responsive. Larger numbers give a more heavy slowly responding camera.")]
public float m_AngularDamping
Field Value
Type | Description |
---|---|
float |
m_AngularDampingMode
How to calculate the angular damping for the target orientation. Use Quaternion if you expect the target to take on very steep pitches, which would be subject to gimbal lock if Eulers are used.
Declaration
public AngularDampingMode m_AngularDampingMode
Field Value
Type | Description |
---|---|
AngularDampingMode |
m_BindingMode
The coordinate space to use when interpreting the offset from the target
Declaration
[Tooltip("The coordinate space to use when interpreting the offset from the target. This is also used to set the camera's Up vector, which will be maintained when aiming the camera.")]
public BindingMode m_BindingMode
Field Value
Type | Description |
---|---|
BindingMode |
m_FollowOffset
The distance which the transposer will attempt to maintain from the transposer subject
Declaration
[Tooltip("The distance vector that the transposer will attempt to maintain from the Follow target")]
public Vector3 m_FollowOffset
Field Value
Type | Description |
---|---|
Vector3 |
m_PitchDamping
How aggressively the camera tries to track the target rotation's X angle. Small numbers are more responsive. Larger numbers give a more heavy slowly responding camera.
Declaration
[Range(0, 20)]
[Tooltip("How aggressively the camera tries to track the target rotation's X angle. Small numbers are more responsive. Larger numbers give a more heavy slowly responding camera.")]
public float m_PitchDamping
Field Value
Type | Description |
---|---|
float |
m_RollDamping
How aggressively the camera tries to track the target rotation's Z angle. Small numbers are more responsive. Larger numbers give a more heavy slowly responding camera.
Declaration
[Range(0, 20)]
[Tooltip("How aggressively the camera tries to track the target rotation's Z angle. Small numbers are more responsive. Larger numbers give a more heavy slowly responding camera.")]
public float m_RollDamping
Field Value
Type | Description |
---|---|
float |
m_XDamping
How aggressively the camera tries to maintain the offset in the X-axis. Small numbers are more responsive, rapidly translating the camera to keep the target's x-axis offset. Larger numbers give a more heavy slowly responding camera. Using different settings per axis can yield a wide range of camera behaviors
Declaration
[Range(0, 20)]
[Tooltip("How aggressively the camera tries to maintain the offset in the X-axis. Small numbers are more responsive, rapidly translating the camera to keep the target's x-axis offset. Larger numbers give a more heavy slowly responding camera. Using different settings per axis can yield a wide range of camera behaviors.")]
public float m_XDamping
Field Value
Type | Description |
---|---|
float |
m_YDamping
How aggressively the camera tries to maintain the offset in the Y-axis. Small numbers are more responsive, rapidly translating the camera to keep the target's y-axis offset. Larger numbers give a more heavy slowly responding camera. Using different settings per axis can yield a wide range of camera behaviors
Declaration
[Range(0, 20)]
[Tooltip("How aggressively the camera tries to maintain the offset in the Y-axis. Small numbers are more responsive, rapidly translating the camera to keep the target's y-axis offset. Larger numbers give a more heavy slowly responding camera. Using different settings per axis can yield a wide range of camera behaviors.")]
public float m_YDamping
Field Value
Type | Description |
---|---|
float |
m_YawDamping
How aggressively the camera tries to track the target rotation's Y angle. Small numbers are more responsive. Larger numbers give a more heavy slowly responding camera.
Declaration
[Range(0, 20)]
[Tooltip("How aggressively the camera tries to track the target rotation's Y angle. Small numbers are more responsive. Larger numbers give a more heavy slowly responding camera.")]
public float m_YawDamping
Field Value
Type | Description |
---|---|
float |
m_ZDamping
How aggressively the camera tries to maintain the offset in the Z-axis. Small numbers are more responsive, rapidly translating the camera to keep the target's z-axis offset. Larger numbers give a more heavy slowly responding camera. Using different settings per axis can yield a wide range of camera behaviors
Declaration
[Range(0, 20)]
[Tooltip("How aggressively the camera tries to maintain the offset in the Z-axis. Small numbers are more responsive, rapidly translating the camera to keep the target's z-axis offset. Larger numbers give a more heavy slowly responding camera. Using different settings per axis can yield a wide range of camera behaviors.")]
public float m_ZDamping
Field Value
Type | Description |
---|---|
float |
Properties
EffectiveOffset
Get the target offset, with sanitization
Declaration
public Vector3 EffectiveOffset { get; }
Property Value
Type | Description |
---|---|
Vector3 |
IsValid
True if component is enabled and has a valid Follow target
Declaration
public override bool IsValid { get; }
Property Value
Type | Description |
---|---|
bool |
Overrides
Stage
Get the Cinemachine Pipeline stage that this component implements. Always returns the Body stage
Declaration
public override CinemachineCore.Stage Stage { get; }
Property Value
Type | Description |
---|---|
CinemachineCore.Stage |
Overrides
TrackerSettings
Get the damping settings
Declaration
protected TrackerSettings TrackerSettings { get; }
Property Value
Type | Description |
---|---|
TrackerSettings |
Methods
ForceCameraPosition(Vector3, Quaternion)
Force the virtual camera to assume a given position and orientation
Declaration
public override void ForceCameraPosition(Vector3 pos, Quaternion rot)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | pos | Worldspace position to take |
Quaternion | rot | Worldspace orientation to take |
Overrides
GetMaxDampTime()
Report maximum damping time needed for this component.
Declaration
public override float GetMaxDampTime()
Returns
Type | Description |
---|---|
float | Highest damping setting in this component |
Overrides
MutateCameraState(ref CameraState, float)
Positions the virtual camera according to the transposer rules.
Declaration
public override void MutateCameraState(ref CameraState curState, float deltaTime)
Parameters
Type | Name | Description |
---|---|---|
CameraState | curState | The current camera state |
float | deltaTime | Used for damping. If less than 0, no damping is done. |
Overrides
OnTargetObjectWarped(Transform, Vector3)
This is called to notify the user that a target got warped, so that we can update its internal state to make the camera also warp seamlessly.
Declaration
public override void OnTargetObjectWarped(Transform target, Vector3 positionDelta)
Parameters
Type | Name | Description |
---|---|---|
Transform | target | The object that was warped |
Vector3 | positionDelta | The amount the target's position changed |
Overrides
OnValidate()
Derived classes should call this from their OnValidate() implementation
Declaration
protected virtual void OnValidate()