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

2.2 KiB
Raw Blame History

Cinemachine Path

Cinemachine Path is a component that defines a world-space path, consisting of an array of waypoints. Each waypoint specifies position, tangent, and roll settings. Bezier interpolation is performed between the waypoints, to get a smooth and continuous path.

Tip: While the path position will always be smooth and continuous, it is still possible to get jarring movement when animating along the path. This happens when tangents arent set to ensure continuity of both the first and second order derivatives. It is not easy to get this right. To avoid this potentially jarring movement, use Cinemachine Smooth Path. CinemachineSmoothPath sets the tangents automatically to ensure complete smoothness.

Properties:

Property: Function:
Resolution Path samples per waypoint. Cinemachine uses this value to limit the granularity when calculating path distances. The crosshatches on the path gizmo in the scene view reflect this value
Appearance The settings that control how the path appears in the Scene view.
Path Color The color of the path when it is selected.
Inactive Path Color The color of the path when it is not selected.
Width The width of the railroad tracks that represent the path.
Looped Check to join the ends of the path to form a continuous loop.
Path Length The length of the path in distance units (read-only).
Selected Waypoint Properties for the waypoint you selected in the Scene view or in the Waypoints list.
Prefer Tangent Drag Check to use the Gizmo for the tangent of a waypoint when the Gizmos for the tangent and position coincide in the Scene view.
Path Details The list of waypoints that define the path.
Position Position in path-local space (i.e. relative to the transform of the path object itself)
Tangent Offset from the position, which defines the tangent of the curve at the waypoint. The length of the tangent encodes the strength of the bezier handle. The same handle is used symmetrically on both sides of the waypoint, to ensure smoothness.
Roll The roll of the path at this waypoint. The other orientation axes are inferred from the tangent and world up.