Firstborn/Library/PackageCache/com.unity.cinemachine@2.8.9/Documentation~/CinemachineDolly.md
Schaken-Mods b486678290 Library -Artifacts
Library -Artifacts
2023-03-28 12:24:16 -05:00

2.7 KiB
Raw Blame History

Using dolly paths

A dolly path is an array of waypoints in a Scene. Use a dolly path to specify a fixed course to position or animate a Virtual Camera. Use the Tracked Dolly algorithm to use a dolly path with your Virtual Camera.

Editing a dolly path in the Scene view

Editing a dolly path in the Inspector window

Cinemachine provides two types of dolly paths:

  • Smooth Path: Each waypoint has a position and roll. Cinemachine uses Bezier interpolation between the waypoints. Smooth Path gives you less control over the position of the path but animation along the path is always smooth and continuous. This is the recommended path type.

  • Path: Each waypoint has a position, tangent, and roll. Use Path for finer control of the tracks position between waypoints. Animating a VIrtual Camera along a Path might cause jerky motion over waypoints when tangents dont allow a smooth transition to and from the waypoint.

To create a Virtual Camera with a dolly path:

  1. In the Unity menu, choose GameObject > Cinemachine > Dolly Camera with Track. A new Virtual Camera and dolly track appears in the Hierarchy. By default, the dolly track GameObject is a Smooth Path.

  2. In the Hierarchy window, select the new dolly track GameObject.

  3. In the Inspector, add and adjust waypoints.

To create a path GameObject:

  1. In the Unity menu, choose GameObject > Create Empty.

  2. Add the path component, either CinemachinePath or CinemachineSmoothPath

To edit a waypoint in a path:

  1. In the Hierarchy window, select the path GameObject.

  2. Select a waypoint by either clicking its index number in the Scene view or clicking its number in the Path Details section in the Inspector.

  3. Edit the waypoint by manipulating its Gizmo in the Scene view or edit its properties in the Inspector.
    Note: When editing a waypoint for a regular path in the Scene view, the waypoint has two Gizmos: for the position and for the tangent.