Class CinemachinePOV
This is a CinemachineComponent in the Aim section of the component pipeline. Its job is to aim the camera in response to the user's mouse or joystick input.
The composer does not change the camera's position. It will only pan and tilt the camera where it is, in order to get the desired framing. To move the camera, you have to use the virtual camera's Body section.
Inherited Members
Namespace: Cinemachine
Syntax
public class CinemachinePOV : CinemachineComponentBase
Fields
m_ApplyBeforeBody
Obsolete - no longer used
Declaration
public bool m_ApplyBeforeBody
Field Value
Type | Description |
---|---|
Boolean |
m_HorizontalAxis
The Horizontal axis. Value is -180..180. Controls the horizontal orientation
Declaration
public AxisState m_HorizontalAxis
Field Value
Type | Description |
---|---|
AxisState |
m_HorizontalRecentering
Controls how automatic recentering of the Horizontal axis is accomplished
Declaration
public AxisState.Recentering m_HorizontalRecentering
Field Value
Type | Description |
---|---|
AxisState.Recentering |
m_RecenterTarget
Defines the recentering target: recentering goes here
Declaration
public CinemachinePOV.RecenterTargetMode m_RecenterTarget
Field Value
Type | Description |
---|---|
CinemachinePOV.RecenterTargetMode |
m_VerticalAxis
The Vertical axis. Value is -90..90. Controls the vertical orientation
Declaration
public AxisState m_VerticalAxis
Field Value
Type | Description |
---|---|
AxisState |
m_VerticalRecentering
Controls how automatic recentering of the Vertical axis is accomplished
Declaration
public AxisState.Recentering m_VerticalRecentering
Field Value
Type | Description |
---|---|
AxisState.Recentering |
Properties
IsValid
True if component is enabled and has a LookAt defined
Declaration
public override bool IsValid { get; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
Stage
Get the Cinemachine Pipeline stage that this component implements. Always returns the Aim stage
Declaration
public override CinemachineCore.Stage Stage { get; }
Property Value
Type | Description |
---|---|
CinemachineCore.Stage |
Overrides
Methods
ForceCameraPosition(Vector3, Quaternion)
Force the virtual camera to assume a given position and orientation.
Procedural placement then takes over
Declaration
public override void ForceCameraPosition(Vector3 pos, Quaternion rot)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | pos | Worldspace pposition to take |
Quaternion | rot | Worldspace orientation to take |
Overrides
GetRecenterTarget()
Get the horizonmtal and vertical angles that correspong to "at rest" position.
Declaration
public Vector2 GetRecenterTarget()
Returns
Type | Description |
---|---|
Vector2 | X is horizontal angle (rot Y) and Y is vertical angle (rot X) |
MutateCameraState(ref CameraState, Single)
Applies the axis values and orients the camera accordingly
Declaration
public override void MutateCameraState(ref CameraState curState, float deltaTime)
Parameters
Type | Name | Description |
---|---|---|
CameraState | curState | The current camera state |
Single | deltaTime | Used for calculating damping. Not used. |
Overrides
OnTransitionFromCamera(ICinemachineCamera, Vector3, Single, ref CinemachineVirtualCameraBase.TransitionParams)
Notification that this virtual camera is going live. Base class implementation does nothing.
Declaration
public override bool OnTransitionFromCamera(ICinemachineCamera fromCam, Vector3 worldUp, float deltaTime, ref CinemachineVirtualCameraBase.TransitionParams transitionParams)
Parameters
Type | Name | Description |
---|---|---|
ICinemachineCamera | fromCam | The camera being deactivated. May be null. |
Vector3 | worldUp | Default world Up, set by the CinemachineBrain |
Single | deltaTime | Delta time for time-based effects (ignore if less than or equal to 0) |
CinemachineVirtualCameraBase.TransitionParams | transitionParams | Transition settings for this vcam |
Returns
Type | Description |
---|---|
Boolean | True if the vcam should do an internal update as a result of this call |
Overrides
PrePipelineMutateCameraState(ref CameraState, Single)
Does nothing
Declaration
public override void PrePipelineMutateCameraState(ref CameraState state, float deltaTime)
Parameters
Type | Name | Description |
---|---|---|
CameraState | state | |
Single | deltaTime |
Overrides
UpdateInputAxisProvider()
API for the inspector. Internal use only
Declaration
public void UpdateInputAxisProvider()