Class CinemachineCamLookInput
- Namespace
- WitShells.ThirdPersonControl
Handles camera look input for Cinemachine third-person camera. Can use settings from ThirdPersonSettings ScriptableObject or local overrides.
public class CinemachineCamLookInput : MonoBehaviour
- Inheritance
-
CinemachineCamLookInput
Fields
lookInput
public Vector2 lookInput
Field Value
- Vector2
Properties
CinemachineCamera
The Cinemachine camera component (auto-cached).
public CinemachineCamera CinemachineCamera { get; }
Property Value
- CinemachineCamera
CurrentPitch
Current pitch angle (vertical rotation).
public float CurrentPitch { get; }
Property Value
CurrentYaw
Current yaw angle (horizontal rotation).
public float CurrentYaw { get; }
Property Value
LookInput
Look input vector (X = horizontal, Y = vertical).
public Vector2 LookInput { get; set; }
Property Value
- Vector2
LookSpeed
Gets the effective look speed from settings or override.
public float LookSpeed { get; }
Property Value
MaxPitch
Gets the effective maximum pitch from settings or override.
public float MaxPitch { get; }
Property Value
MinPitch
Gets the effective minimum pitch from settings or override.
public float MinPitch { get; }
Property Value
Sensitivity
Gets the effective sensitivity from settings or override.
public float Sensitivity { get; }
Property Value
Settings
The settings ScriptableObject. Can be changed at runtime.
public ThirdPersonSettings Settings { get; set; }
Property Value
Target
The camera's tracking target transform.
public Transform Target { get; }
Property Value
- Transform
Methods
ApplySettings(ThirdPersonSettings)
Apply settings from a ThirdPersonSettings ScriptableObject.
public void ApplySettings(ThirdPersonSettings newSettings)
Parameters
newSettingsThirdPersonSettings
ResetRotation()
Resets the camera rotation to look at the target's forward direction.
public void ResetRotation()
SetAngles(float, float)
Sets the camera angles directly.
public void SetAngles(float yaw, float pitch)
Parameters
SetTarget(Transform)
Sets the camera's tracking target.
public void SetTarget(Transform target)
Parameters
targetTransform