# 3. Follow, LookAt, Framing, and Orbital (FreeLook) Part of [[Cinemachine 3]]. Prev: [[2.Body Aim Noise and Priorities]]. Next: [[4.Impulse Noise and Extensions]]. **Docs:** [FreeLook Cameras](https://docs.unity3d.com/Packages/[email protected]/manual/FreeLookCameras.html) · [Orbital Follow](https://docs.unity3d.com/Packages/[email protected]/manual/CinemachineOrbitalFollow.html) · [Position Composer](https://docs.unity3d.com/Packages/[email protected]/manual/CinemachinePositionComposer.html) · [[Input System]] ## 3.1 Tracking Target vs Look At CM3 defaults to **one Tracking Target** (follow + look). Enable a distinct **Look At** only when composition needs a different point (e.g. follow hips, look at head / aim point). Authoring tip: put an empty `CameraTarget` child on the character at a stable height. Animate or script that transform for looks/cutaways rather than rebinding the CinemachineCamera every frame — keeps Brain blends stable. Cross-link: character readability in [[Animation Advanced]] / [[Level Up! (Review)]]. ## 3.2 FreeLook in CM3 (no FreeLook class) **GameObject → Cinemachine → FreeLook Camera** creates a `CinemachineCamera` with: 1. **`CinemachineOrbitalFollow`** — orbit position (Sphere or Three Ring). 2. **`CinemachineRotationComposer`** — keep target framed. 3. **`CinemachineInputAxisController`** — drives horizontal / vertical / radius axes from input. Orbital Follow axes: **horizontal**, **vertical**, **radius**. Modes: - **Sphere** — any point on a sphere around the target. - **Three Ring** — CM2-like top/mid/bottom orbits extruded into a surface. Binding modes include **Lazy Follow** (renamed from CM2 `SimpleFollowWithWorldUp`) and lock-to-target variants — see Orbital Follow docs for the full list. ### Alternative FreeLook style Position Control → **Position Composer** + Rotation Control → **Pan Tilt**: Pan Tilt sets view angle; Position Composer keeps the target on-screen. Useful for rail-ish or 2.5D games. ## 3.3 Wire Input System (recommended) CM3 **does not** read axes inside OrbitalFollow itself. Drive axes via **Input Axis Controller** (or your own `InputAxisControllerBase` subclass). ```csharp using UnityEngine; using UnityEngine.InputSystem; using Unity.Cinemachine; /// <summary> /// Example: push Look action into an OrbitalFollow-driven FreeLook. /// Prefer the built-in CinemachineInputAxisController when its Reader /// fields match your Input System setup; this shows the idea if you /// drive axes yourself. NOT compiled in Unity — verify 3.1.x API. /// </summary> public sealed class OrbitalLookDriver : MonoBehaviour { [SerializeField] InputActionReference lookAction; // Vector2 [SerializeField] CinemachineOrbitalFollow orbital; [SerializeField] float yawSpeed = 180f; [SerializeField] float pitchSpeed = 120f; void OnEnable() => lookAction?.action.Enable(); void OnDisable() => lookAction?.action.Disable(); void Update() { if (orbital == null || lookAction == null) return; Vector2 look = lookAction.action.ReadValue<Vector2>(); // Horizontal / Vertical are InputAxis structs on OrbitalFollow in 3.x. // Exact property names: confirm in your 3.1.x Inspector / API. // Common pattern: orbital.HorizontalAxis.Value += look.x * yawSpeed * Time.deltaTime; // orbital.VerticalAxis.Value += look.y * pitchSpeed * Time.deltaTime; // Marked unverified — prefer CinemachineInputAxisController bindings first. _ = look; // suppress unused until you confirm axis API in Editor _ = yawSpeed; _ = pitchSpeed; } } ``` > Prefer configuring **CinemachineInputAxisController** in the Inspector against your [[Input System]] Look action. Scripted axis writes are a fallback for custom rigs. ## 3.4 Position Composer (Framing Transposer replacement) Keeps the Tracking Target at a **screen-space** position. Key knobs (docs): - **Camera Distance**, **Screen Position**, **Dead Zone**, **Hard Limits** - **Lookahead Time / Smoothing** — anticipates motion; noisy animation amplifies jitter — turn down if shaky - **Damping** per axis - **Center On Activate** Great for side-scrollers, top-down, and "keep subject in thirds" cinematic framing. ## 3.5 Third Person Follow `CinemachineThirdPersonFollow` pivots horizontally/vertically around the player with the pivot at the Tracking Target, following target rotation. Pair with a shoulder offset for classic third-person. Often combines with a short **Deoccluder** for wall proximity (part 4). ## 3.6 Script: swap Look At for a cutaway beat ```csharp using UnityEngine; using Unity.Cinemachine; /// <summary> /// Temporarily retarget Look At for a cinematic beat, then restore. /// NOT compiled in Unity. /// </summary> public sealed class CmLookAtSwap : MonoBehaviour { [SerializeField] CinemachineCamera cam; [SerializeField] Transform defaultLookAt; [SerializeField] Transform cutawayLookAt; Transform _restore; public void BeginCutaway() { if (cam == null) return; _restore = cam.LookAt; cam.LookAt = cutawayLookAt != null ? cutawayLookAt : defaultLookAt; } public void EndCutaway() { if (cam == null) return; cam.LookAt = _restore != null ? _restore : defaultLookAt; } } ``` *(Property names `LookAt` / `Follow` / `Target` — confirm on `CinemachineCamera` in your 3.1.x API; Tracking Target simplification may expose a single `Target` with optional separate Look At toggle in the Inspector.)* ## Unverified - Exact C# property names for OrbitalFollow axis structs (`HorizontalAxis` vs `Horizontal`) — confirm in 3.1 API browser. - Exact `CinemachineCamera.LookAt` vs Tracking Target API surface after "single Tracking Target" UX change.