docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Samples and tutorials

    Several sample scenes and video tutorials are available in addition to this documentation to demonstrate how to use the Cinemachine features in real-world scenarios.

    Sample scenes

    The Cinemachine package includes sample scenes that you can import to your project to discover many Cinemachine features in different contexts of use.

    2D Samples

    Once you import the 2D Samples set, the following scenes are available in the Assets/Samples/Cinemachine/<version number>/2D Samples folder.

    Sample scene Use cases and key features
    2D Fighters
    • Set up a camera that dynamically composes the shot according to the remaining players in the game.
    • Emulate players that move along predefined paths.
    2D Platformer
    • Set up a custom camera group that switches cameras based on the player state.
    • Set up a camera that frames a boss room entirely when the player enters the room.
    • Confine the camera to prevent it from seeing outside the game map.
    Camera Magnets
    • Set up "magnets" that attract the camera's attention according to the player's proximity.
    • Confine the camera to prevent it from seeing outside the game map.

    3D Samples

    Once you import the 3D Samples set, the following scenes are available in the Assets/Samples/Cinemachine/<version number>/3D Samples folder.

    Sample scene Use cases and key features
    Brain Update Modes
    • Prevent animated characters from jittering in the camera view.
    • Understand the effect of the Cinemachine Brain Update Method according to the way you move the framed characters.
    Clear Shot
    • Set up a group of fixed and moving cameras that target the same player from different perspectives.
    • Automatically select the best shot based on occlusion (when the current camera loses sight of the player).
    Cutscene
    • Set up a cutscene with camera blends and asset animations in Timeline.
    • Trigger a cutscene that blends in from the game camera, plays through, and then blends back out to the game camera.
    Early LookAt Custom Blend
    • Author a custom camera blending algorithm.
    • Hook into Cinemachine's blend creation to override the default blend algorithm.
    Fly around
    • Set up a first-person fly around camera with basic height and speed controls.
    FreeLook Deoccluder
    • Set up a free look camera that handles occlusion by walls to keep the player in view.
    • Set up the scene and the camera to consider certain objects as transparent and ignore them in the occlusion evaluation.
    FreeLook on Spherical Surface
    • Set up a free look camera that automatically re-orients to follow a player that can walk on any surface.
    • Set up the camera to follow the character either lazily or actively.
    Impulse Wave
    • Set up the the camera and objects in the scene to make them react to impulse waves.
    • Invoke an impulse from a fixed epicenter.
    • Trigger an impulse when the player jumps.
    Lock-on Target
    • Set up a simple third-person free look camera to look at the player and rotate around it with the mouse.
    • Set up a camera that looks at the player and locks on a boss character when the player enters a trigger zone.
    Mixing Camera
    • Set up a camera group that continuously blends multiple cameras as a function of the car speed.
    • Set up a fixed camera that activates for a cut-in when the car enters a two-ramp stunt zone, to frame the car jump from the side.
    Perspective To Ortho Custom Blend
    • Author a custom camera blending algorithm.
    • Hook into Cinemachine's blend creation to override the default blend algorithm.
    • Create a smooth perspective-to-orthographic blend, which is not natively supported by Cinemachine.
    Portals
    • Seamlessly teleport a player and its FreeLook camera.
    Running Race
    • Set up a clear shot group of cameras that each follow a different runner.
    • Customize the clear shot quality assessment to always have the race leader in the center of the camera view.
    • Set up an on-demand camera that frames all runners.
    • Emulate players that move along predefined paths.
    Split Screen Car
    • Display two racing cars in a split screen configuration.
    Third Person With Aim Mode
    • Set up a camera that follows the player as it moves, jumps, and sprints.
    • Set up a special camera that moves and aims according to the player aiming controller, and use a dynamic crosshair.
    • Add noise to a camera to emulate a handheld effect and ignore this effect to keep accuracy when the player aims and fires projectiles.
    Third Person With Roadie Run
    • Set up a camera that follows the player as it moves, jumps, aims, and fires projectiles, and use a dynamic crosshair.
    • Set up a camera recoil effect when the player fires projectiles.
    • Set up a special roadie run camera that automatically activates when the player sprints, with increased noise and no crosshair.

    Input System Samples

    Once you import the Input System Samples set, the following scene is available in the Assets/Samples/Cinemachine/<version number>/Input System Samples folder.

    Sample scene Use cases and key features
    Split Screen Multiplayer
    • Author a custom Cinemachine input handler that interacts with the Player Input component of the Input System package.
    • Dynamically add multiple players in split screen, each with their own free look camera system.

    Simple Player Controller

    Several of the samples listed above make use of Cinemachine's Simple Player Controller, a basic but versatile player controller that you can use in your own projects. It is a suite of scripts that you can combine and configure to create character controllers which you can use in different contexts to implement several types of character movement.

    Tutorials

    Note

    This section links to videos that were made with a previous version of Cinemachine. You might notice a few changes in the interface and the naming of some elements, but all the explained concepts and shown functionality still apply to the latest Cinemachine version.

    A "Using Cinemachine" series of video tutorials is available online in Unity's official YouTube channel. Discover various Cinemachine use cases and watch the immediate effects resulting from the corresponding project setup.

    Video Description
    Getting Started Keep a camera focused on a Transform and follow it as it moves around in the Scene.
    Track & Dolly Track targets by setting paths for the Cinemachine Cameras to move between.
    State Driven Cameras Link Cinemachine Cameras to animation states and further customize their behavior in the Scene.
    Free Look Create an orbital camera system with input from the player and maintain control of the camera composition at different orbit stages.
    Clear Shot Dynamically cut between Cinemachine Cameras in the Scene as a tracked target is occluded.
    Post Processing With the addition of the post-processing stack, Cinemachine allows to blend easily between different effects on the cameras or in the Scene.
    Cinemachine 2D Use Cinemachine composition tools with an orthographic virtual camera in a 2D Project.
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)