> For the complete documentation index, see [llms.txt](https://axongenesis.gitbook.io/timeflow/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://axongenesis.gitbook.io/timeflow/reference/behaviors/animation/motion-path.md).

# Motion Path

Animate objects in 3d with a Bezier path and velocity curve

{% embed url="<https://youtu.be/3_HNXLDK4hQ>" %}

Use Motion Path to animate objects in 3D space with advanced curve editing features to take full control over an object's position, rotation, and velocity over time.&#x20;

{% hint style="success" %}
To add a Motion Path, right-click on an object in the Timeflow view and select:

#### Add Animation > Motion Path > New Motion Path

{% endhint %}

{% hint style="danger" %}

## Avoid using on objects with an Animator component

Whenever a Motion Path is applied to a game object with an Animator component, a warning will be displayed. It is strongly suggested to apply the motion path on a parent object instead, otherwise it may conflict with the animation applied by Animator. This is especially true with character animations or anything that applies root motion. You may choose to ignore this warning if there is no immediate conflict.
{% endhint %}

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2Fp6bwQHE8InBZLQZiWhff%2Fimage.png?alt=media&amp;token=ef31853c-b5cc-40bb-8f49-8d2d7ca5d337" alt=""><figcaption></figcaption></figure>

Motion Path initially exposes 1 channel, Path Position, and may optionally expose Path Rotation and Velocity channels.

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2F5EScJvDyrr4XJMKP7HwH%2Fimage.png?alt=media&amp;token=9b470fa9-3fd3-4ab9-9a87-4aaaed650384" alt=""><figcaption><p> </p></figcaption></figure>

{% hint style="info" %}
When a new Motion Path is created, a start and end keyframe are added automatically starting at the current time. This is to help get started though these keyframes may be changed or deleted.
{% endhint %}

{% hint style="danger" %}
Motion Path requires at least 2 keyframes to interpolate. If only 1 keyframe is present, then the object holds at that position. If all keyframes are removed from the channel, then the Motion Path behavior has no effect on the object.
{% endhint %}

### Velocity Curves

Path Position is a special type of channel combining position and velocity in one. Each keyframe relates to a node on the path and also determines velocity over time.

{% hint style="success" %}
To edit the path velocity, select Path Position and switch to the [Graph View](/timeflow/user-guide/timeflow-view/graph-view.md).
{% endhint %}

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FiCqGP6k5zP0tLeu83rsT%2Fimage.png?alt=media&amp;token=6691fbfa-9777-40e0-9b33-b4f7d9469ee3" alt=""><figcaption><p>In the Graph View, a single curve is displayed depicting the object's relative velocity.</p></figcaption></figure>

This curve displays relative velocity from one keyframe to the next. Each keyframe Value (as seen in the [Info Panel) ](/timeflow/user-guide/timeflow-view/info-panel.md)is the total average velocity from one keyframe to the next and is automatically calculated based on its distance and time from the previous keyframe.

{% hint style="info" %}
Note that the Path Position velocity curve is relative, not absolute. To work with the final computed velocity of an object, see [Velocity Channel](#velocity-channel).
{% endhint %}

#### Velocity Calculation

When moving a keyframe in time you'll notice that the curve and velocity values automatically adapt due to the mathematical constraints of the formulae shown below.&#x20;

{% hint style="info" %}
Velocity is calculated between two keyframes A and B as follows:

**`velocity = Distance(A.position, B.position) / (B.time - A.time)`**

\
Or in simpler terms:&#x20;

**`velocity = distance / seconds`**`  ``(i.e. units per second)`
{% endhint %}

The curve between keyframes then determines how the velocity is distributed over time. Since the total average velocity must add up to cover the distance over time, speeding up one half of the curve requires slowing down the other half.&#x20;

{% hint style="warning" %}
The velocity graph naturally trends upwards from left to right and is cumulative over the path length. This means it is impossible to place a keyframe lower on the graph than the preceding one, since the distance between nodes is always a positive value.&#x20;

If 2 keyframes have the same position (and the tangents are zero), the velocity curve between them is flat since there is nothing interpolate.
{% endhint %}

#### Velocity Curve Examples

Following are some examples to illustrate how velocity curves behave.

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2F0xqtNTiyqzMHux00NFDb%2Fimage.png?alt=media&amp;token=17b29656-e223-4d40-84e4-068e3aeb2fd4" alt=""><figcaption><p>If the path curve reaches the target position too soon, the path becomes flat for the remaining time. This means the object reaches the next keyframe position early and holds that value for the remaining duration.</p></figcaption></figure>

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FTXuNQ4CY44zWewvs1Zwy%2Fimage.png?alt=media&amp;token=2332ef12-f5ca-4d39-a1ad-69f7413b9fc3" alt=""><figcaption><p>Any time the velocity curve flattens out, the object slows to a stop at that point.</p></figcaption></figure>

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FVVSxDWYer09Lml9kX4ZM%2Fimage.png?alt=media&amp;token=cfab001d-e79c-433b-8106-821484414ee8" alt=""><figcaption><p>If a velocity curve starts fast then dips back down, the object travels retrograde along the path during the time the curve is descending, but ultimately catches back up.</p></figcaption></figure>

Refer to the [Graph View](/timeflow/user-guide/timeflow-view/graph-view.md#bezier-curves) documentation for more curve editing features.

{% hint style="info" %}
For alternate methods of animating objects along a Motion Path, see [Place On Path](/timeflow/reference/behaviors/automation/place-on-path.md). &#x20;
{% endhint %}

## Motion Path Editor

Select the object to view its settings in the Inspector.

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FqCArOi8twSSqJxCkUrdh%2Fimage.png?alt=media&amp;token=fa70a52a-a975-488c-8e3d-d5242a9147a4" alt=""><figcaption></figcaption></figure>

For common features, see [Menu Bar ](/timeflow/user-guide/timeflow-editor/menu-bar.md)and [Update Settings](/timeflow/user-guide/timeflow-editor/update-settings.md).&#x20;

### Interpolation

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2Fbm5W20XCRHcQo0KTk5WS%2Fimage.png?alt=media&amp;token=a52783a6-ff7f-43c5-9306-9651ed4b6355" alt=""><figcaption></figcaption></figure>

#### Interpolation Mode

Select one of the following path interpolation modes.

* **Hold:** The path does not interpolate and the object remains fixed at each keyframe position.
* **Linear:** Interpolates in a straight line from one position keyframe to the next.
* **Bezier:** Full curve editing features with 3D Bezier tangents.

{% hint style="success" %}
Note that the path Interpolation Mode applies only to the path in 3D space and is separate from the velocity curve interpolation shown in the Graph View.
{% endhint %}

#### Close Path

If enabled, the path is forced to be a closed shape. Use this for circular and looping paths.

{% hint style="warning" %}
A closed path requires at least 3 keyframes. Also it is important to be aware that the first and last keyframe in the path become tied together and changing one affects the other.
{% endhint %}

{% hint style="success" %}
To create a closed path, it is recommended to first set at least 3 keyframes and arrange them in the shape generally desired in the Scene View. Add more keyframes if needed. Before enabling Close Path make sure the start and end keyframes are near each other. The end keyframe snaps to the start keyframe once Close Path is enabled.
{% endhint %}

#### Rotation Mode

Select one of the following modes to determine how rotation is calculated:

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2F6mpwTmCKqEdXB1rV0VNl%2Fimage.png?alt=media&amp;token=4fd968ec-4ab7-4dd9-9fb3-c8ce4859b960" alt=""><figcaption></figcaption></figure>

* **None:** No rotation is calculated. Use this mode to animate rotation separately.
* **Interpolate:** Interpolates the rotations of each keyframe node.
* **Look Ahead:** Automatically rotates by looking ahead on the path.

{% hint style="success" %}
Use Interpolate to control the object's rotation using the rotation of each keyframe node. When this mode is selected, the rotation of each node may be set using the [rotate tool in the Scene View](#gizmos-scene-view), or entered numerically in the Info Panel for selected keys.
{% endhint %}

#### Look Ahead Time

Sets the time in seconds to look ahead on the path for Look Ahead interpolation.&#x20;

{% hint style="success" %}
Use Look Ahead for easier setup. Using this mode, the object faces the direction of travel automatically and requires less work than setting rotation for each node manually.
{% endhint %}

{% hint style="success" %}
For additional control over an object's rotation, insert an extra transform in the hierarchy to add offsets and/or animate using any behavior or method desired.
{% endhint %}

#### Expose Target Object

When using Look Ahead, enable this option to expose the look target in the hierarchy view as a game object. This object is managed by Motion Path and should not be deleted or moved.

{% hint style="warning" %}
Please keep the look target object under same parent as the motion path object, otherwise any inherited transforms could break the look at calculation and produce unexpected results.
{% endhint %}

{% hint style="info" %}
The main reason to expose the look target is to use it for other calculations or behaviors. For example, it could be used as the look target for other objects, or an object could be placed at the look position by making it a child or connecting it using [Channel Link](/timeflow/user-guide/timeflow-view/channel-link.md).
{% endhint %}

#### Up Vector

This settings only applies to Look Ahead rotation and determines the upward direction of the object for the [look at calculation](https://docs.unity3d.com/ScriptReference/Transform.LookAt.html). This expects a normalized value (adding up to 1) defining a cardinal direction. Usually this value is (0, 1, 0) though may be changed if the object is oriented on a different plane.&#x20;

See the Unity documentation on [Vector3](https://docs.unity3d.com/ScriptReference/Vector3.html).

#### Orientation

Adds rotation in Euler angles to the object overall. Use this to orient the object. The property may also be animated to apply additional rotation to that already calculated by the motion path.

{% hint style="info" %}

#### Other ways of animating rotation

An alternative to the rotation modes above is to use a separate behavior or animation channel. Object rotation can be animated independently using a [standard animation channel](/timeflow/user-guide/timeflow-view/channels.md#adding-channels-and-behaviors) or a behavior such as [Auto Rotate](/timeflow/reference/behaviors/automation/auto-rotate.md) .&#x20;

To use an alternate method, make sure to set the Rotation Mode to [None](#rotation-mode).
{% endhint %}

#### Auto Tangent Ratio

Controls how 3D Bezier tangents are calculated for keyframes using [Auto Calculate](#auto-calculate). The slider represents the tangent lengths relative to its neighboring nodes. This affects the degree of curving with a value of 0 being linear (no tangent length) and a value of 1 being maximum tangent length.

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FkXdA6ZuxZraS0lwlthWw%2Fimage.png?alt=media&amp;token=7be22e9e-e64d-4a81-8bab-741632abd176" alt=""><figcaption></figcaption></figure>

The ratio is multiplied with the Weight value of each node, so you may adjust the degree of bending on a per-keyframe basis. See the [Motion Path Nodes](#motion-path-nodes) section below.

{% hint style="info" %}
Enable Auto Update for keyframe nodes to automatically recalculate tangents&#x20;
{% endhint %}

{% hint style="info" %}
This only affects keyframes set to [Auto Calculate](#auto-calculate) mode, which can be set in the [Scene View](#auto-calculate) or in the [node details](#nodes).
{% endhint %}

#### Position Smoothing

Applies temporal smoothing to the position based on time in seconds. Use this to create smoother object motions, when adhering to the path is not as important.

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FN392s0RzaLjnMIkM4ZTk%2Fimage.png?alt=media&amp;token=cb95cedc-9282-4cd9-a0d4-ee51ba0b4671" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Position Smoothing dampens the movement of the object using a time delay, causing it to round corners and has a softening/reducing effect on the curve overall.&#x20;
{% endhint %}

{% hint style="warning" %}
For strict adherence to the path, disable Position Smoothing and only adjust the keyframes and velocity curve to smooth out the motion.
{% endhint %}

#### Rotation Smoothing

Applies temporal smoothing to rotation over time in seconds.&#x20;

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FkEMXayCcXrqy0PcxZvvG%2Fimage.png?alt=media&amp;token=a5fd1314-4736-4b04-ac96-43b8fcc14f2f" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Rotation Smoothing delays an object's rotation. Larger values may cause the rotation to lag behind the path's rotation.&#x20;
{% endhint %}

{% hint style="danger" %}
The smoothing features require continuous play to calculate properly. When jumping or skipping in time, the calculation feature will not be accurate until it is given sufficient time playing uninterrupted. To view the results of smoothing, simply play the Timeflow view.
{% endhint %}

## Motion Path Nodes

The Nodes section displays a list of all keyframe nodes on the path.&#x20;

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FlMnSPX0Dn4q1Eu6Lxazf%2Fimage.png?alt=media&amp;token=8f0e6e3b-ea43-42a6-99ae-30ae593e8005" alt=""><figcaption></figcaption></figure>

#### Expand / Collapse

Each node may be expanded using the foldout arrow on the left to further edit specific details. Use the buttons Expand All and Collapse All to open or close details for all nodes.

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FJf1KZYhf38buvXrccVnJ%2Fimage.png?alt=media&amp;token=6bd5bc22-7235-47f0-9fbf-f7ddd3ef4350" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
To help facilitate keyframe editing, each node is automatically expanded and highlighted in the inspector when keyframes are selected in either the scene or Timeflow views.&#x20;
{% endhint %}

### Expose Nodes

Each keyframe on a motion path is associated with a node object. These are objects are hidden from the hierarchy view by default to reduce clutter in the project, however may be revealed for additional uses or direct editing of the game objects.&#x20;

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FlRhTIESa6r75zQWKEzRO%2Fimage.png?alt=media&amp;token=54cd9783-17d7-4379-9558-05468408b7d6" alt=""><figcaption><p>The nodes exposed in the hierarchy view</p></figcaption></figure>

{% hint style="info" %}
By using game objects to represent nodes on a motion path, more advanced features are possible and makes path nodes easily accessed by other scripts. Objects may also be placed relative to nodes on a path, and nodes can be used to influence other behaviors. Nodes can be hidden again at any time by unchecking Expose Nodes. Also see [Place On Path](/timeflow/reference/behaviors/automation/place-on-path.md) for another way to place objects relative to a path or node.
{% endhint %}

{% hint style="danger" %}

#### Beware of making objects children of nodes

Although it is not prohibited, it is advised against using nodes as the parent for any other objects in the scene. Doing so my result in objects being deleted if keyframes are removed. An alternative is to use [Follow ](/timeflow/reference/behaviors/automation/follow.md)to link a game object position to a node.&#x20;
{% endhint %}

When nodes are exposed in the hierarchy, selecting one or more objects shows its details in the inspector. These are the same parameters shown in the Nodes section above, however this method supports multi-object editing so you can change attributes multiple nodes at once.

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2F2eQplcTO8V6nQgbldgsb%2Fimage.png?alt=media&amp;token=c16292ae-36e9-45ce-a07a-de2f9f7b58e1" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The motion path automatically detects changes to position and rotation as long as Timeflow is not playing. Changes may be applied directly by editing the fields in the inspector for one or multiple objects.&#x20;
{% endhint %}

{% hint style="info" %}
Note that if you use the move and rotate tools on a selected node object in the scene view, the selection reverts back to the Motion Path for full editing features.&#x20;
{% endhint %}

### Locking Nodes

Each keyframe node may be locked in time and/or value to prevent changes to it. To lock all keyframes at once, use the Lock All and Unlock All buttons. &#x20;

{% hint style="info" %}
Keyframe nodes may also be locked/unlocked in the Scene View and Timeflow view.
{% endhint %}

### Clear All

Deletes all keyframes and nodes from the path.

### Expose ID

This makes a keyframe node accessible to other scripts to set its value remotely. This is an advanced scripting feature only used for special setups where a motion path is modified by a custom script. For more about this feature, please see the documentation for [Exposed Keyframes](/timeflow/reference/timeflow-object/channels.md#exposed-keyframes).

## Tools & Options

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FpkxHOEYK5cI03DCHYjcn%2Fimage.png?alt=media&amp;token=55c27505-3e56-4903-bb1d-179b99df9e14" alt=""><figcaption></figcaption></figure>

### Show Gizmos

Enable this to display the 3D path and editing tools in the Scene View. The color may be set independently from the channel color and may be adjusted as preferred.

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2Fk3LFIrXxUNMdwoVytdFJ%2Fimage.png?alt=media&amp;token=b5bb1dec-2820-4e0d-bb33-9f5e0909967c" alt=""><figcaption><p>Note that Gizmos must be enabled in the Scene view for the motion path and editing features to be displayed. This is covered in <a href="#gizmos-scene-view">more detail below</a>.</p></figcaption></figure>

### Stay Visible

If enabled, the path remains visible in the Scene View even when the object is not selected. Otherwise, the path and gizmos are only displayed when the object is the active selection.

{% hint style="info" %}
This setting only affects the visibility of the path. The editing controls are only ever displayed when the motion path or one of its nodes are selected.
{% endhint %}

### Can Edit

This enables the motion path editing tools displayed in the Scene View. See the [Gizmos / Scene View](#gizmos-scene-view) section below for further information.

### Rotation Channel

Enable this to expose the object rotation as a separate read-only channel. This outputs the final rotation of the object which may be used with [Channel Link](/timeflow/user-guide/timeflow-view/channel-link.md) to drive other behaviors.

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FoMAK7w2Zrmy2rUph8IhN%2Fimage.png?alt=media&amp;token=653fd085-6c85-4341-aa8f-bd115cbd5113" alt=""><figcaption></figcaption></figure>

### Velocity Channel

Enable to expose a separate read-only velocity channel outputting the final velocity of the object. This is not to be confused with the relative velocity curve in the Path Position channel.

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FvqsbUTQkqTQe8QR7OjIa%2Fimage.png?alt=media&amp;token=ca4c492a-dbe4-4ac3-83bc-b1f58076fc57" alt=""><figcaption></figcaption></figure>

* **Vector:** velocity as a Vector3
* **Speed:** velocity in units per second (vector length)
* **Interpolation:** current path interpolation from 0-1 over full length of path

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FFb0MP66Rq7NenzXNGEAS%2Fimage.png?alt=media&amp;token=777be60b-257b-4741-ad2b-e166d3b1a70c" alt=""><figcaption><p>Depending on the mode selected the Path Velocity may either be a float or Vector3 channel.</p></figcaption></figure>

{% hint style="warning" %}

#### Read-Only at Current Time

Rotation and Velocity channels are read-only. Their values are processed at the same time as the main motion path channel. These channels may be used with [Channel Link](/timeflow/user-guide/timeflow-view/channel-link.md) however they do not support time offsets, only values at the current time.
{% endhint %}

### Bounding Frames

This is an editor tool for visualization and scene construction. When enabled, square bracket shapes are drawn along the path in the Scene View.&#x20;

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FRbdzevYEhsReJBzjQdLT%2Fimage.png?alt=media&amp;token=708250c9-dd9a-406d-bfbd-bc45269b278d" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Bounding frames are a helpful visual aid to see the shape of the path in 3D and to identify any issues with velocity and rotation.&#x20;
{% endhint %}

The default settings display rectangles along the path, enabled by Draw Rectangles. Adjust the Size and Count as desired.&#x20;

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FVXZrfQptu4HQ1O1FSldl%2Fimage.png?alt=media&amp;token=0d9de26a-36cc-4544-9106-fdaa00191d4e" alt=""><figcaption></figcaption></figure>

The frames are spaced according to the path velocity if Use Velocity is enabled, otherwise they are spaced evenly over the distance of the path. Adjust the Start and End to limit the frames to a specific part of the path.

### Prefab & Generate Objects

Any game object or prefab may be replicated along the path. When an object is assigned, mesh instances are drawn in the Scene View as a preview however the objects are not visible in the camera until generated as game objects.

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FabVbcWLzi7HBqfHxEsmw%2Fimage.png?alt=media&amp;token=b3b5ffd5-fdac-432a-88e8-c54516258660" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
Bounding Frames are only displayed in the Scene View and are not visible in the camera unless they are generated into game objects using the Generate Objects button.
{% endhint %}

{% hint style="success" %}
Once objects are generated, they are no longer referenced or managed by the motion path and may be altered, moved, or deleted as you wish.
{% endhint %}

## Notify On Setup

This is both an editor and runtime feature to notify other components when the motion path has been setup or modified. This is particularly useful to update other behaviors that base their positioning on the path, such as when using [Follow](/timeflow/reference/behaviors/automation/follow.md) or [Place On Path](/timeflow/reference/behaviors/automation/place-on-path.md).&#x20;

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FD82BGa4XFIoHJt3glfcz%2Fimage.png?alt=media&amp;token=4ca130f9-0447-4239-b704-eb2dc3a41370" alt=""><figcaption><p>Click the + button to add a component function. This only works for methods without parameters.</p></figcaption></figure>

## Gizmos / Scene View

Additional path editing tools are displayed in the Scene View while the object is selected. &#x20;

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2Fkv44ldj6dBJypdhBOOkw%2Fimage.png?alt=media&amp;token=0506a29f-0a2e-4984-966c-bf650f2874df" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Make sure to enable Show Gizmos and Can Edit and also that Gizmos are enabled in the Scene View.
{% endhint %}

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2Fa3utrukNUTHObzsuoLwc%2Fimage.png?alt=media&amp;token=a1497e0d-2308-47d7-941e-efda96e3643c" alt=""><figcaption></figcaption></figure>

### Keyframe Selection

Each keyframe node is displayed as a yellow dot. Click on a keyframe to select it. The selected key is displayed with a movable position handle, which can also be rotated by switching to the Rotate tool in the Unity toolbar. &#x20;

{% hint style="info" %}
When viewing the motion path in the Scene View and in Timeflow at the same time, selecting a keyframe in either view selects it in the other. &#x20;
{% endhint %}

{% hint style="success" %}
Select multiple keyframes by holding the Shift key while clicking.
{% endhint %}

{% hint style="success" %}
Double-click a keyframe to select it and jump to its time in the Timeflow view.
{% endhint %}

### Add Key

Click to insert a new keyframe at the current time.&#x20;

{% hint style="info" %}
This button is disabled if there is already a keyframe at the current time.
{% endhint %}

### Prev / Next

Selects the next or previous keyframe. Use this to iterate through the keyframe nodes.

### Select

Use this menu to select all nodes, deselect all, or select the first or last node.

### Lock / Unlock

Click the lock icon to toggle the locked state of the currently selected keyframes. Locked keyframes are displayed with a small lock next to them.&#x20;

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FlklK2CuqlSuE8UkjX6Ad%2Fimage.png?alt=media&amp;token=d3581471-ed54-4c9d-b035-afe768dbc0fe" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Locked keyframes can still be selected but not moved or modified. &#x20;
{% endhint %}

### Tangents

When using Bezier interpolation, each selected keyframe displays tangent handles to edit the shape of the curve. Click and drag on the tangent handles to modify them.&#x20;

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2Fj2VkA2SCoY5fdXVCgKF6%2Fimage.png?alt=media&amp;token=0d5f8231-b426-4ce6-b29f-3d87c66531d0" alt=""><figcaption><p>The tangent handles are displayed as small cubes connected by the red line extending from the keyframe. </p></figcaption></figure>

#### Auto Calculate

Keyframes may be set to auto calculate tangents which approximates handles based on its position relative to the neighboring nodes.&#x20;

{% hint style="info" %}
Auto Calculate performs an educated guess at the shape desired, however it is unavoidable that it will sometimes produce undesired results. This mode works best for intermediate keyframes and can be helpful when creating a path to get the approximate shape before manually fine tuning each keyframe.
{% endhint %}

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FK31UoMDXHpqlG7xHW95u%2Fimage.png?alt=media&amp;token=ded724eb-bc10-4390-a2b1-078d0c49da6a" alt=""><figcaption><p>When Auto Calculate is enabled, the keyframe tangent line is displayed in cyan (rather than red)</p></figcaption></figure>

{% hint style="warning" %}
Auto Calculate is turned off automatically for any keyframe as soon as any direct modification is made to its tangents.
{% endhint %}

{% hint style="info" %}
Enable [Tangent Auto Update](#auto-tangent-ratio) to continuously update keyframes with Auto Calculate enabled. This results in a flexible path that dynamically adapts to changes.&#x20;
{% endhint %}

{% hint style="success" %}
To auto calculate tangents just once without enabling Auto Calculate mode, use the Tangent menu command Expand.
{% endhint %}

#### Break / Unify

By default tangents are unified, meaning that adjusting one side affects the other and they remain connected in a straight line. However tangents may be broken to independently edit each side.&#x20;

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FqSSZIr9JG5gJ7m3X6nl6%2Fimage.png?alt=media&amp;token=739017df-9c63-49a5-9a2d-c3a0417b82ae" alt=""><figcaption><p>Break tangents to create a hard angle or abrupt change.</p></figcaption></figure>

#### Collapse

This command sets the tangents to 0 length resulting in a hard angle. This can be used to make keyframe nodes linear rather than curved.&#x20;

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FxNl6BEt4rTS3IUoqPvDU%2Fimage.png?alt=media&amp;token=59c757b0-4820-45ea-9871-a464255daf37" alt=""><figcaption></figcaption></figure>

#### Expand

Automatically calculates tangents based on the keyframe position relative to other nodes.

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FbySZ6teRe4ebW50VFGYA%2Fimage.png?alt=media&amp;token=208b61a5-d10b-4f21-9ad1-e00a8f758586" alt=""><figcaption></figcaption></figure>

#### Show / Hide

Use these commands to show and hide the tangent controls for selected keyframes. This has no effect on the shape of the path and simply determines whether the UI controls are displayed.

{% hint style="info" %}
Once tangents have been set for keyframes, you may want to hide them to prevent further changes without first showing them again.&#x20;
{% endhint %}

#### Flatten

Use these options to set tangents to zero, flattening them on the specified plane.

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2Fn0w5xIGGlxQ86JzbeETW%2Fimage.png?alt=media&amp;token=7b8d0367-7e9a-49b9-a87d-a95d2e9dc041" alt=""><figcaption></figcaption></figure>

### Delete Node

Deletes the selected keyframe nodes. This has the same effect as deleting keyframes in the Timeflow view or Inspector.

## Additional Notes

### Broken Path?

At some point you may encounter a situation where the path in the scene view flattens out or has a linear segment that doesn't make sense and appears to be broken.

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FJ78J7SUQKq1qW2uJnNei%2Fimage.png?alt=media&amp;token=624ceeed-b8f6-494e-a5af-722d89fd2665" alt=""><figcaption><p>The path shape cutting across in a straight line is caused by a jump in velocity.</p></figcaption></figure>

This is a result of the velocity curve shown below. This can happen after inserting a new keyframe and requires adjusting the tangents and keyframe timing to balance out the curve.&#x20;

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2Fgn8HdIaM56Ul0mAAi8jq%2Fimage.png?alt=media&amp;token=2bf0ac8b-3ad5-4967-9e4c-09a73577c296" alt=""><figcaption><p>Because the tangent of the first keyframe is so extreme, it is causing the velocity to jump in order to reach the next keyframe position on time.</p></figcaption></figure>

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FyYSrZwHXhqFfHOg0ShSZ%2Fimage.png?alt=media&amp;token=05aa3d9c-92c5-477b-b2bc-40daa4f1a33b" alt=""><figcaption><p>Adjust the tangents to create a smoother velocity curve.</p></figcaption></figure>

Once the kinks in the velocity curve have been smoothed out, the 3D curve appears correctly.&#x20;

<figure><img src="https://2067910529-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FC3dOuetlQfYgK5FPUKgn%2Fuploads%2FwKlrX1w1c8CqvLyBEaoU%2Fimage.png?alt=media&amp;token=9b919b62-ab31-4de1-8dce-49b34c610f0f" alt=""><figcaption></figcaption></figure>
