Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 2D and top-down games

[!include[](includes/package-version-message.md)]

Use and configure Cinemachine to meet your expectations according to specific requirements of 2D graphics and top-down games.

* [Cinemachine and 2D graphics](Cinemachine2D.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 3D tracking scenarios

[!include[](includes/package-version-message.md)]

Use Cinemachine to follow and look at the active characters of your 3D games.


Expand Down
2 changes: 2 additions & 0 deletions com.unity.cinemachine/Documentation~/Cinemachine2D.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 2D graphics

[!include[](includes/package-version-message.md)]

Cinemachine supports orthographic cameras. When you set the Unity camera's projection to Orthographic, Cinemachine adjusts to accommodate it. In CinemachineCamera properties for __Lens__, __FOV__ is replaced by __Orthographic Size__. Note that settings related to FOV and certain FOV-oriented behaviors such as [Follow Zoom](CinemachineFollowZoom.md) have no effect if the camera is orthographic.

In orthographic environments, it doesn’t usually make sense to rotate the camera. Accordingly, Cinemachine provides the [Position Composer](CinemachinePositionComposer.md) to handle framing and composition without rotating the camera.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Auto Focus

[!include[](includes/package-version-message.md)]

This CinemachineCamera extension drives the Camera's focusDistance property. It can be used to lock focus onto a specific object, or (in HDRP) to auto-detect what is in front of the camera and focus on that.

FocusDistance is only relevant for physical cameras, and appropriate processing must be installed for it to have any visible effect.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Basic Multi Channel Perlin component

[!include[](includes/package-version-message.md)]

Use a Basic Multi Channel Perlin component in a Cinemachine Camera GameObject to simulate camera shake via Perlin noise movement. Perlin noise is a technique to compute pseudo-random movement with a natural behavior.

The Basic Multi Channel Perlin component applies a [Noise Profile Asset](CinemachineNoiseProfiles.md) which defines the noise behavior over time. Cinemachine includes a few noise profile assets. You can edit them and create your own ones.
Expand Down
2 changes: 2 additions & 0 deletions com.unity.cinemachine/Documentation~/CinemachineBlending.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Blender Settings asset

[!include[](includes/package-version-message.md)]

Use a Cinemachine Blender Settings asset from the [Cinemachine Brain component](CinemachineBrain.md) to define **Custom Blends** (overriding the **Default Blend** setting) between specific pairs of Cinemachine Cameras.

For more information about blends, refer to [Camera control and transitions](concept-camera-control-transitions.md).
Expand Down
2 changes: 2 additions & 0 deletions com.unity.cinemachine/Documentation~/CinemachineBrain.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Brain component

[!include[](includes/package-version-message.md)]

The Cinemachine Brain is a component in the Unity camera itself. Cinemachine Brain monitors all active [**CinemachineCameras**](CinemachineCamera.md) in the Scene. It chooses the next CinemachineCamera to control the Unity camera. It also controls the [transition (cut or blend)](concept-camera-control-transitions.md) from the current CinemachineCamera to the next.

Objects with a Cinemachine Brain are displayed in the hierarchy with a little CinemachineCamera icon next to them. You can turn that off from the Cinemachine Preferences panel.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Brain Events

[!include[](includes/package-version-message.md)]

Use the Cinemachine Brain Events component to handle events sent for a specific Cinemachine Brain.

For more information, refer to [Cinemachine Events](CinemachineEvents.md).
Expand Down
2 changes: 2 additions & 0 deletions com.unity.cinemachine/Documentation~/CinemachineCamera.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Camera component

[!include[](includes/package-version-message.md)]

The CinemachineCamera is a component that you add to an empty GameObject. It represents a Cinemachine Camera in the Unity Scene.

![CinemachineCamera properties](images/CmCameraInspector.png)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Camera Events

[!include[](includes/package-version-message.md)]

Use the Cinemachine Camera Events component to handle events sent for a specific Cinemachine Camera.

For more information, refer to [Cinemachine Events](CinemachineEvents.md).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Camera Manager Events

[!include[](includes/package-version-message.md)]

Use the Cinemachine Camera Manager Events component to handle events sent for a specific Cinemachine Camera Manager.

For more information, refer to [Cinemachine Events](CinemachineEvents.md).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Clear Shot Camera

[!include[](includes/package-version-message.md)]

The __Cinemachine ClearShot Camera__ component chooses among its child CinemachineCameras for the best quality shot of the target. Use Clear Shot to set up complex multi-camera coverage of a Scene to guarantee a clear view of the target.

This can be a very powerful tool. CinemachineCamera children with [Cinemachine Deoccluder](CinemachineDeoccluder.md) or other shot quality evaluator extensions analyze the shot for target obstructions, optimal target distance, and so on. Clear Shot uses this information to choose the best child to activate.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Avoid collisions and evaluate shots

[!include[](includes/package-version-message.md)]

As characters and objects move around in a complex Scene, obstacles in the Scene sometimes come between a camera and its target. Similarly, you might need to move a camera to a position in the Scene that another GameObject already occupies. Cinemachine provides extensions to handle these situations:

* [Cinemachine Decollider](CinemachineDecollider.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Collision Impulse Source

[!include[](includes/package-version-message.md)]

For collision-based impulses, attach a **CinemachineCollisionImpulseSource** component to a GameObject that has a Collider or Collider2D component. **CinemachineCollisionImpulseSource** generates an impulse when something collides with the GameObject or enters a trigger zone.

To add a Collision Impulse Source component:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Confiner 2D

[!include[](includes/package-version-message.md)]

![The Cinemachine Confiner 2D extension component and its properties in the Inspector.](images/CinemachineConfiner2Dc.png)

Use the Cinemachine Confiner 2D [extension](https://docs.unity3d.com/Packages/com.unity.cinemachine@2.6/manual/CinemachineVirtualCameraExtensions.html) to confine the camera’s position so that the screen edges stay within a shape defined by a 2D polygon. This works for orthographic or perspective cameras, provided that the camera's forward vector remains parallel to the bounding shape’s normal (that is, that the camera is looking straight at the polygon, and not obliquely at it).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Confiner 3D

[!include[](includes/package-version-message.md)]

Use the __Cinemachine Confiner 3D__ [extension](concept-procedural-motion.md#extensions) to limit the camera’s position to a volume.

The camera’s position in 3D is confined to a volume.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Decollider

[!include[](includes/package-version-message.md)]

__Cinemachine Decollider__ is an [extension](concept-procedural-motion.md#extensions) for the [Camera](CinemachineCamera.md). It post-processes the final position of the CinemachineCamera to pull the camera out of colliding objects. Although collisions will be resolved in the direction of the camera target, no attempt will be made to preserve the line of sight to the target. For that, please use [CinemachineDeoccluder](CinemachineDeoccluder.md).

The Decollider combines two algorithms:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Deoccluder

[!include[](includes/package-version-message.md)]

__Cinemachine Deoccluder__ is an [extension](concept-procedural-motion.md#extensions) for the CinemachineCamera. It post-processes the final position of the CinemachineCamera to attempt to preserve the line of sight with the __Look At__ target of the CinemachineCamera. It does this by moving away from the GameObjects that obstruct the view.

Add a Cinemachine Deoccluder extension to a CinemachineCamera to do any of the following tasks:
Expand Down
2 changes: 2 additions & 0 deletions com.unity.cinemachine/Documentation~/CinemachineEvents.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Events

[!include[](includes/package-version-message.md)]

Cinemachine generates events in the following contexts:
* Whenever cameras are activated and deactivated.
* When blends are started and when they finish.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine External Camera - (deprecated)

[!include[](includes/package-version-message.md)]

**Note:** This component is **deprecated** in favour of using a normal CinemachineCamera with _None_ in both __Position Control__ and __Rotation Control__.

This component will expose a non-cinemachine camera to the cinemachine ecosystem, allowing it to participate in blends. Just add it as a component alongside an existing Unity Camera component. You will need to take steps (e.g. disabling the Camera component) to ensure that the Camera doesn't fight with the main Cinemachine Camera.
Expand Down
2 changes: 2 additions & 0 deletions com.unity.cinemachine/Documentation~/CinemachineFollow.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Follow component

[!include[](includes/package-version-message.md)]

This CinemachineCamera __Position Control__ behavior moves the CinemachineCamera to maintain a fixed offset relative to the __Tracking Target__. It also applies damping.

The fixed offset can be interpreted in various ways, depending on the Binding Mode.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Follow Zoom

[!include[](includes/package-version-message.md)]

This [extension](concept-procedural-motion.md#extensions) adjusts the FOV of the lens to keep the target object at a constant size on the screen, regardless of camera and target position.

## Properties:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine FreeLook Modifier

[!include[](includes/package-version-message.md)]

This component is intended to be added to a CinemachineCamera set up as a [FreeLook](FreeLookCameras.md). It is not necessary to have it (the FreeLook works just fine without it) but it can add some richness to the camera experience.

It allows you to vary some settings (for instance lens, noise, damping, composition, or camera distance) depending on whether the camera is at the top, middle, or bottom of its defined orbit. By default, the camera settings remain constant over the entire orbit. With the FreeLook Modifier, you can change that.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Group Framing component

[!include[](includes/package-version-message.md)]

This component is a Cinemachine Camera extension that adds the ability to frame one or more targets when they are members of a Cinemachine Target Group. You can use it to dynamically adjust the zoom or to move the camera closer to or farther from the targets, to keep them in the frame at the desired size.

To enable the functionality of the Cinemachine Group Framing component, you must:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Hard Lock to Target

[!include[](includes/package-version-message.md)]

This CinemachineCamera __Position Control__ behavior uses the same position at the __Tracking Target__. In other words, the target acts as a mounting point for the CinemachineCamera.

### Properties
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Hard Look At

[!include[](includes/package-version-message.md)]

This CinemachineCamera __Rotation Control__ behaviour rotates the camera to keep the __Look At__ target in the center of the camera's frame. Optionally, an offset can be specified in order to look at a point that is offset from the LookAt target's origin.
This is useful for looking at a character's head, or some other point of interest.

Expand Down
2 changes: 2 additions & 0 deletions com.unity.cinemachine/Documentation~/CinemachineImpulse.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Impulse

[!include[](includes/package-version-message.md)]

Cinemachine Impulse generates and manages camera shake in response to game events. For example, you can use Impulse to make a CinemachineCamera shake when one GameObject collides with another, or when something in your Scene explodes.

Impulse has two parts:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Filtering impulses

[!include[](includes/package-version-message.md)]

Filtering lets you fine-tune how and when an Impulse Source generates impulses. Cinemachine Impulse allows two types of filtering:

- Use channel filtering to set things up so that an Impulse Listener reacts to certain Impulse Sources and ignores others. See [Filtering with channels](#ChannelFiltering) below for details.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Impulse Listener

[!include[](includes/package-version-message.md)]

Impulse signals and [sources](CinemachineImpulseSourceOverview.md) don’t do anything on their own. An **Impulse Listener** is a Cinemachine extension that allows a CinemachineCamera to “hear” impulse vibration signals and react to them.

Default implementations shipped with Cinemachine respond by applying the received signal directly to the listener’s transform position, causing it to shake along with the signal. Additionally, it’s possible to specify a secondary response - usually a randomized vibration along all positions and rotation axes - to give character to the listener’s movement. It’s as if the listener were supported on springs and then kicked by the impulse signal. In addition to the thrust given by the kick itself, there will be randomized shaking due to the springs.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Impulse Source

[!include[](includes/package-version-message.md)]

Use the **Cinemachine Impulse Source** component to generate impulses on events that are not collisions or Collider triggers. This is a generic Impulse Source that exposes a family of `GenerateImpulse()` API methods. These methods generate impulses at the specified locations and with the specified velocities and strengths. Call these methods directly from your game logic, or use them with [UnityEvents](https://docs.unity3d.com/Manual/UnityEvents.html).

> [!TIP]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Impulse Sources

[!include[](includes/package-version-message.md)]

An Impulse Source is a component that emits a vibration signal from a point in Scene space. Game events can cause an Impulse Source to emit a signal from the place where the event occurs. The event _triggers_ impulses, and the source _generates_ impulses. CinemachineCameras with an Impulse Listener extension _react_ to impulses by shaking.

In the image below, the figure's feet are Impulse Sources. When they collide with the floor (A) they generate impulses. The camera is an Impulse Listener and reacts to the impulses by shaking (B), which shakes the resulting image in the game view (C).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Input Axis Controller

[!include[](includes/package-version-message.md)]

Cinemachine cameras don't directly process user input. Instead, they expose axes that are meant to be _driven_, either by script, animation, or by user input. As much as possible Cinemachine remains agnostic about where the input is coming from. This way, it can be compatible with Unity's Input package, Unity's legacy input manager, or other third-party input systems.

Included with Cinemachine is the CinemachineInputAxisController component. When you add it to a CinemachineCamera, it auto-detects any axes that can be driven by user input and exposes settings to allow you to control those axis values.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Manage grouped cameras

[!include[](includes/package-version-message.md)]

A __Manager Camera__ oversees many CinemachineCameras but acts as a single CinemachineCamera from the point of view of Cinemachine Brain and Timeline.

Cinemachine includes these manager cameras:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Cinemachine Mixing Camera

[!include[](includes/package-version-message.md)]

The __Cinemachine Mixing Camera__ component uses the weighted average of its child CinemachineCameras to compute the position and other properties of the Unity camera.

![Cinemachine Mixing Camera with two child CinemachineCameras (red)](images/CinemachineMixingCamera.png)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Split screen and multiple Unity Cameras

[!include[](includes/package-version-message.md)]

By design, [CinemachineCameras](CinemachineCamera.md) are not directly linked to [CinemachineBrains](CinemachineBrain.md). Instead, active CinemachineCameras in the scene are dynamically found by the Brain, allowing them to be brought into existence via prefab instantiation or scene loading. By default, if multiple CinemachineBrains exist in the scene, they will all find the same CinemachineCameras and consequently display the same thing. To assign a specific CinemachineCamera to a specific Brain, **Cinemachine Channels** are used. This works the same way as Unity Layers.

First, set your CinemachineCamera to output to the desired channel:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Noise Settings Asset

[!include[](includes/package-version-message.md)]

A __noise profile__ is an asset that defines a procedural curve for camera noise. The __Basic Multi Channel Perlin__ component applies a noise profile to the movement of the camera. Cinemachine applies noise movement after computing the position of the camera. This way, camera noise does not affect the computation of camera movement in future updates.

Cinemachine includes some predefined profile assets. Choose a predefined noise profile in the Noise component. Create your own noise profile asset by choosing __Create > Cinemachine > NoiseSettings__ in the [Project window](https://docs.unity3d.com/Manual/ProjectView.html).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Orbital Follow

[!include[](includes/package-version-message.md)]

This CinemachineCamera __Position Control__ behavior moves the Unity camera in a variable relationship to the CinemachineCamera’s __Tracking Target__. If you add a [Cinemachine Input Axis Controller](CinemachineInputAxisController.md) behavior, the camera position can be driven by [player input](https://docs.unity3d.com/Manual/ConventionalGameInput.html), which allows the player to dynamically control the position of the camera relative to the target.

__Orbital Follow__ operates in 2 modes:
Expand Down
2 changes: 2 additions & 0 deletions com.unity.cinemachine/Documentation~/CinemachinePanTilt.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Pan Tilt

[!include[](includes/package-version-message.md)]

This CinemachineCamera __Rotation Control__ behavior pans and tilts the camera in response stimulus, for instance the user’s input. This component does not read user input itself; it can be be driven by an [Cinemachine Input Axis Controller](CinemachineInputAxisController.md) component or by some other means that you devise.

## Properties:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Using the Cinemachine Pixel Perfect extension

[!include[](includes/package-version-message.md)]

Both the __Pixel Perfect Camera__ and Cinemachine modify the Camera’s orthographic size. Using these two systems together in a single Scene would cause them to fight for control over the Camera and produce unwanted results. The __Cinemachine Pixel Perfect__ extension solves this incompatibility.

__Cinemachine Pixel Perfect__ is an [extension](concept-procedural-motion.md#extensions) for the __CinemachineCamera__ that alters the orthographic size of the CinemachineCamera. The extension detects the presence of the Pixel Perfect Camera component, and uses the component settings to calculate for the correct orthographic size of the CinemachineCamera that best retains the Sprites in a pixel-perfect resolution.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Position Composer

[!include[](includes/package-version-message.md)]

This CinemachineCamera __Position Control__ behavior moves the camera to maintain a desired screen-space position for the __Tracking Target__. You can also specify offsets, damping, and composition rules. __Position Composer__ only changes the camera’s position in space; it does not rotate the camera. To control the view angle of the camera, set the CinemachineCamera's rotation in its transform, or add a procedural [Rotation Control](CinemachineCamera.md#set-procedural-components-and-add-extension) component to the CinemachineCamera.

__Position Composer__ is good for 2D and orthographic cameras, and it also works with perspective cameras and 3D environments.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Post Processing Extension

[!include[](includes/package-version-message.md)]

Use the Cinemachine Post Processing [extension](concept-procedural-motion.md#extensions) to attach a Postprocessing V2 profile to a CinemachineCamera.

**Note 1**: Unity recommends using Postprocessing V2 instead of Postprocessing V1.
Expand Down
Loading