# 2. Body, Aim, Noise, and Priorities Part of [[Cinemachine 3]]. Prev: [[1.Package Install and Mental Model]]. Next: [[3.Follow LookAt Framing and Orbital]]. **Docs:** [CinemachineCamera](https://docs.unity3d.com/Packages/[email protected]/manual/CinemachineCamera.html) · [What's new](https://docs.unity3d.com/Packages/[email protected]/manual/whats-new.html) ## 2.1 Pipeline = ordinary components In CM2, Body/Aim/Noise lived on a hidden `cm` child. In **CM3**, procedural pieces are **standard components on the CinemachineCamera GameObject**. Inspectors expose: - **Position Control** (was "Body") — where the camera sits. - **Rotation Control** (was "Aim") — where it looks / how it rotates. - **Noise** — continuous procedural shake shortcut. - **Add Extension** — Deoccluder, Impulse Listener, Confiner, etc. Access in code with normal `GetComponent`: ```csharp using UnityEngine; using Unity.Cinemachine; public sealed class CmPipelinePeek : MonoBehaviour { void Awake() { var follow = GetComponent<CinemachineFollow>(); var orbital = GetComponent<CinemachineOrbitalFollow>(); var rot = GetComponent<CinemachineRotationComposer>(); var noise = GetComponent<CinemachineBasicMultiChannelPerlin>(); // Prefer GetComponent over CM2 GetCinemachineComponent — removed conceptually in CM3. Debug.Log(quot;Follow={follow != null} Orbital={orbital != null} Rot={rot != null} Noise={noise != null}"); } } ``` ## 2.2 Position Control options (Body) | Menu option | Component | Use when | |---|---|---| | Follow | `CinemachineFollow` | Fixed offset relationship to Tracking Target | | Orbital Follow | `CinemachineOrbitalFollow` | Player-orbit / FreeLook surface (sphere or three-ring) | | Third Person Follow | `CinemachineThirdPersonFollow` | Shoulder / over-the-shoulder pivot around target | | Position Composer | `CinemachinePositionComposer` | Screen-space framing (strong for 2D/ortho; works in 3D) | | Hard Lock to Target | (hard lock) | Camera position = target position | | Spline Dolly | `CinemachineSplineDolly` | Path-driven shots (Unity Splines) | ## 2.3 Rotation Control options (Aim) | Menu option | Component | Use when | |---|---|---| | Rotation Composer | `CinemachineRotationComposer` | Frame Look At / Tracking with composition + damping | | Hard Look At | | Always center the Look At | | Pan Tilt | `CinemachinePanTilt` | User-driven pitch/yaw (alt FreeLook style) | | Rotate With Follow Target | `CinemachineRotateWithFollowTarget` | Match target rotation | ## 2.4 Priority and "who is live" Brain continuously picks the highest-**Priority** enabled `CinemachineCamera` on accepted Channels. Patterns that work well in production: 1. **Gameplay cam** Priority 10, always enabled. 2. **Aim-down-sights / interact** Priority 20 while active, else disabled or Priority 0. 3. **Cinematic cutaway** Priority 30, enabled for the shot duration (Timeline or script). ```csharp using UnityEngine; using Unity.Cinemachine; /// <summary> /// Simple priority stack for ADS vs gameplay camera. /// NOT compiled in Unity. /// </summary> public sealed class CmPriorityStack : MonoBehaviour { [SerializeField] CinemachineCamera gameplay; [SerializeField] CinemachineCamera ads; [SerializeField] int gameplayPriority = 10; [SerializeField] int adsPriority = 20; void Awake() { if (gameplay != null) gameplay.Priority = gameplayPriority; if (ads != null) { ads.Priority = 0; ads.enabled = false; } } public void SetAds(bool on) { if (ads == null) return; ads.enabled = on; ads.Priority = on ? adsPriority : 0; } } ``` ## 2.5 Noise vs Impulse (preview) - **Noise** (`CinemachineBasicMultiChannelPerlin`) — continuous handheld feel. Tune Amplitude / Frequency Gain. See part 4. - **Impulse** — event-driven shakes (explosions, footsteps). Source emits; Listener on the camera reacts. See part 4. Do not stack heavy Noise *and* large Impulse without intentional design — players read it as bad stabilization ([[Level Up! (Review)]] camera comfort). ## 2.6 Extensions slot Common extensions (Add Extension on the CinemachineCamera): - **CinemachineImpulseListener** — react to Impulse Sources. - **CinemachineDeoccluder** (CM2 Collider) — pull camera in front of occluders. - **CinemachineConfiner2D / 3D** — keep camera inside a volume/polygon. - **CinemachineGroupFraming** — with Rotation Composer for multi-target framing. ## Unverified - Exact enum / property names for every Position Control binding mode beyond what Orbital Follow docs list (`LazyFollow`, etc.). - HDRP/URP volume adapter ifdef behaviour in your render pipeline setup.