Table of Contents

Class CinemachineCamLookInput

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

float

CurrentYaw

Current yaw angle (horizontal rotation).

public float CurrentYaw { get; }

Property Value

float

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

float

MaxPitch

Gets the effective maximum pitch from settings or override.

public float MaxPitch { get; }

Property Value

float

MinPitch

Gets the effective minimum pitch from settings or override.

public float MinPitch { get; }

Property Value

float

Sensitivity

Gets the effective sensitivity from settings or override.

public float Sensitivity { get; }

Property Value

float

Settings

The settings ScriptableObject. Can be changed at runtime.

public ThirdPersonSettings Settings { get; set; }

Property Value

ThirdPersonSettings

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

newSettings ThirdPersonSettings

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

yaw float
pitch float

SetTarget(Transform)

Sets the camera's tracking target.

public void SetTarget(Transform target)

Parameters

target Transform