Class CinemachineTransposer
This is a CinemachineComponent in the Body section of the component pipeline. Its job is to position the camera in a fixed relationship to the vcam's Follow target object, with offsets and damping.
The Tansposer will only change the camera's position in space. It will not re-orient or otherwise aim the camera. To to that, you need to instruct the vcam in the Aim section of its pipeline.
Inheritance
Inherited Members
Namespace: Cinemachine
Assembly: solution.dll
Syntax
[DocumentationSorting(DocumentationSortingAttribute.Level.UserRef)]
[AddComponentMenu("")]
public class CinemachineTransposer : CinemachineComponentBase
Fields
Name | Description |
---|---|
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. |
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. |
m_BindingMode | The coordinate space to use when interpreting the offset from the target |
m_FollowOffset | The distance which the transposer will attempt to maintain from the transposer subject |
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. |
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. |
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 |
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 |
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. |
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 |
Properties
Name | Description |
---|---|
AngularDamping | Damping speeds for each of the 3 axes of the target's rotation |
Damping | Damping speeds for each of the 3 axes of the offset from target |
EffectiveOffset | Get the target offset, with sanitization |
HideOffsetInInspector | Hide the offset in int inspector. Used by FreeLook. |
IsValid | True if component is enabled and has a valid Follow target |
Stage | Get the Cinemachine Pipeline stage that this component implements. Always returns the Body stage |
Methods
Name | Description |
---|---|
ForceCameraPosition(Vector3, Quaternion) | Force the virtual camera to assume a given position and orientation |
GetMaxDampTime() | Report maximum damping time needed for this component. |
GetOffsetForMinimumTargetDistance(Vector3, Vector3, Vector3, Vector3, Vector3) | Return a new damped target position that respects the minimum distance from the real target |
GetReferenceOrientation(Vector3) | Internal API for the Inspector Editor, so it can draw a marker at the target |
GetTargetCameraPosition(Vector3) | Internal API for the Inspector Editor, so it can draw a marker at the target |
InitPrevFrameStateInfo(ref CameraState, float) | Initializes the state for previous frame if appropriate. |
MutateCameraState(ref CameraState, float) | Positions the virtual camera according to the transposer rules. |
OnTargetObjectWarped(Transform, Vector3) | This is called to notify the us that a target got warped, so that we can update its internal state to make the camera also warp seamlessy. |
OnValidate() | Derived classes should call this from their OnValidate() implementation |
TrackTarget(float, Vector3, Vector3, out Vector3, out Quaternion) | Positions the virtual camera according to the transposer rules. |