Struct AxisState.Recentering
Helper for automatic axis recentering
Namespace: Cinemachine
Syntax
[DocumentationSorting(DocumentationSortingAttribute.Level.UserRef)]
[Serializable]
public struct RecenteringConstructors
Recentering(Boolean, Single, Single)
Constructor with specific field values
Declaration
public Recentering(bool enabled, float waitTime, float recenteringTime)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | enabled | |
| System.Single | waitTime | |
| System.Single | recenteringTime | 
Fields
m_enabled
If checked, will enable automatic recentering of the axis. If FALSE, recenting is disabled.
Declaration
public bool m_enabledField Value
| Type | Description | 
|---|---|
| System.Boolean | 
m_RecenteringTime
How long it takes to reach destination once recentering has started
Declaration
public float m_RecenteringTimeField Value
| Type | Description | 
|---|---|
| System.Single | 
m_WaitTime
If no input has been detected, the camera will wait this long in seconds before moving its heading to the default heading.
Declaration
public float m_WaitTimeField Value
| Type | Description | 
|---|---|
| System.Single | 
Methods
CancelRecentering()
Cancel any recenetering in progress.
Declaration
public void CancelRecentering()CopyStateFrom(ref AxisState.Recentering)
Declaration
public void CopyStateFrom(ref AxisState.Recentering other)Parameters
| Type | Name | Description | 
|---|---|---|
| AxisState.Recentering | other | 
DoRecentering(ref AxisState, Single, Single)
Bring the axis back to the cenetered state (only if enabled).
Declaration
public void DoRecentering(ref AxisState axis, float deltaTime, float recenterTarget)Parameters
| Type | Name | Description | 
|---|---|---|
| AxisState | axis | |
| System.Single | deltaTime | |
| System.Single | recenterTarget | 
RecenterNow()
Skip the wait time and start recentering now (only if enabled).
Declaration
public void RecenterNow()Validate()
Call this from OnValidate()
Declaration
public void Validate()