Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMCL-0000: Documentation bug bash #1007

Merged
merged 4 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
8 changes: 3 additions & 5 deletions com.unity.cinemachine/Documentation~/CinemachineBlending.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# Cinemachine Blender Settings
# Cinemachine Blender Settings asset

Use blending properties to specify how the Cinemachine Brain component performs a blend between CinemachineCameras.
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.

A Cinemachine blend is not a fade, wipe, or dissolve. Rather, Cinemachine Brain performs a smooth animation of the position, rotation, and other settings of the Unity camera from one CinemachineCamera to the next.

For blends between specific CinemachineCameras, use the __Custom Blends__ list in the Cinemachine Brain component. Use the __Default Blend__ property in Cinemachine Brain to specify blends between CinemachineCameras that do not have custom blends.
For more information about blends, refer to [Camera control and transitions](concept-camera-control-transitions.md).

![Custom Blends list in Cinemachine Brain](images/CinemachineCustomBlends.png)

Expand Down
2 changes: 1 addition & 1 deletion com.unity.cinemachine/Documentation~/CinemachineBrain.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cinemachine Brain component

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 [cut or blend](CinemachineBlending.md) from the current CinemachineCamera to the next.
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,13 +1,13 @@
# Cinemachine Third Person Aim Extension

This extension is created to be a part of a third-person camera rig.
This extension is a complement to the [ThirdPersonFollow component](CinemachineThirdPersonFollow.md) in the Cinemachine Camera. Its purpose is to detect the object that the camera is aiming at.

To preserve aiming accuracy, this extension deliberately cancels out all rotational noise, and forces a hard look at the target point. However, it's still possible to use camera noise with this extension, provided that the noise affects the camera position, instead of the rotation.
To accomplish this, the extension projects a ray from the camera's position along its forward axis, to detect the first object that intersects with that ray. The intersection point is then placed in the CinemachineCamera's `state.ReferenceLookAt`. That is the point that the camera will be considered to be looking at for algorithms that need to know it (for example, blending).

See the __AimingRig__ sample scene for an example of this.

Additionally, if _Aim Target Reticle_ is non-null, this extension will project a ray from the Follow target's position and find the first object that collides with that ray. The Aim Target Reticle object will then be placed on that point in the Game View, to indicate what the player would hit if a shot were to be fired. This point may be different from what the camera is looking at, if the found object is close enough to be affected by parallax as a result of the offset between player and camera.
Additionally, if **Noise Cancellation** is enabled, you can use this extension to stabilize the target at the screen center, even when the camera has handheld noise enabled. Rotational noise is canceled out, but if the camera has positional noise (and a non-zero noise offset), that is preserved, and the aim corrected to maintain target stability on the screen.

> [!NOTE]
> The _ThirdPersonWithAimMode_ [sample scene](samples-tutorials.md) gives an example of use of this extension.

## Properties:

Expand All @@ -17,3 +17,9 @@ Additionally, if _Aim Target Reticle_ is non-null, this extension will project a
| __Ignore Tag__ | Objects with this tag are ignored. It's a good idea to set this field to the target's tag. |
| __Aim Distance__ | How far to project the object detection ray. |
| __Noise Cancellation__ | When this is enabled, the aim target will be stabilized on the screen when handheld noise is present on the camera. This will only work if the Pivot Offset in the Noise component is nonzero. |

## Parallax issues

Since there is generally an offset between the player firing origin (where the bullets come from) and the camera position, if the player were to fire a shot along its forward axis (which in the third person rig is always parallel to the camera's forward axis), then it would always miss the target by exactly that offset. For most third-person scenarios, the appropriate thing to do is to just _ignore the discrepancy_ and pretend that the camera's target _is_ what the player is aiming at, and just fire towards that point.

In some situations, however, there might be an object that obstructs the player's view of the target but not the camera's. In those cases, if the player were to fire it would hit that other object and not the camera's target. Cinemachine checks for this condition and calculates the actual point that the player would hit if it were to fire. That point is available in the API (`CinemachineThirdPersonAim.AimTarget`).
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Constrain a camera to a path

Use a Spline to constrain the movement of a camera along a predefined and customizable path.
Use a [Spline](https://docs.unity3d.com/Packages/com.unity.splines@latest) to constrain the movement of a camera along a predefined and customizable path.

A Spline path is a path formed by a Spline in a scene. Use a Spline to specify a fixed course to position or animate a CinemachineCamera. Use the [Spline Dolly](CinemachineSplineDolly.md) behaviour to make your CinemachineCamera follow a Spline path.

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading