🛩️Flyby
Create flight paths based on destination and trajectory
Flyby generates a motion path procedurally based on either a starting position, destination, or midpoint reached at a specific time. The path may be linear with a fixed heading or using an object's rotation to create all sorts of curves and spirals, which would otherwise be difficult to achieve using a Motion Path or other means.

To add Flyby, right-click on the object in the Timeflow view and select:
Add Automation > Flyby
Flyby Channel
Flyby initially has 1 channel with a single special type of keyframe at the target time. The duration of the flyby is indicated by the bar extending from the keyframe, which may either be centered, before, or after depending on the mode selected.

The keyframe may be selected, moved, and included in edit operations, however cannot be deleted nor can any new keyframes be added to the Flyby channel.
To generate a path that supports multiple keyframes, see Motion Path.
Flyby Editor
Select the game object to view the Flyby settings in the Inspector view.

Positioning Mode
Sets the anchor position and time by which the path is generated.

The position remains fixed (to the start, end, or midpoint depending on the mode selected) no matter what changes are made to velocity or heading. This anchors the path at the specified position and time making adjustments much easier.
Flyby Position
Generates a path that passes thru the Flyby Position at the designated time.

Flyby mode is best suited for objects that need to meet at a specific point or cross another object. For example, use this to make objects pass by or in front of the camera.
Start Position
Generates a path beginning at the designated time from the Start Position.

This mode is best for paths that require starting at a specific time and place, such as an airplane taking off or a ship leaving a dock.
Destination Position
Generates a path arriving at the End Position at the designated time.

Use this mode to animate objects to a specific location with generated animation leading up to it. This mode is best for objects that animate up to a point and stop or hand off to other animation channels.
At Time
Specifies the time which correlates directly to the keyframe on the channel. How time is used depends on the Positioning Mode as explained above.
Duration
Sets the base duration used for calculating the motion path given the velocity and heading.
Hold In / Out
When enabled, Flyby holds the transform position values outside of the active duration: before the start (Hold In) and after the end (Hold Out). Otherwise if disabled, Flyby is bypassed does not affect the object before/after the duration. This is primarily used to prevent Flyby from overwriting channels before it, to allow another Flyby or other behavior to have full control.

Hold In and Hold Out are depicted in the Track View (as shown above) with a ghosted region extending before and after the duration bar.
Channel Order
Note that channels are processed in the order listed and may result in one channel overwriting others before it. Whether the list displays top-down or first-to-last can be changed in the Timeflow Preferences.
Orientation
Sets the overall rotation of the whole path. Use orientation to alter the direction and/or pivot the entire path around the target position.
Orientation does not change the object rotation, only the path, so may result in misalignment. To orient the entire path and object together, use a parent object to rotate and place the path.
Direction

Determines the heading to generate the motion path from. The first six options listed are cardinal directions for creating simple linear paths along an axis (in local space), as shown below.


Reverse
Enable this to flip the direction of travel for the entire path. Toggle Reverse to correct an object traveling backwards.
Custom Direction
Select this mode to enter a specific fixed direction based on a vector heading. This expects a normalized value (adding up to 1) though any value may be used.

While it may be tempting to animate the Heading (which is possible) it will not produce the results of steering an object as you might expect. Instead, use a Rotation Channel.
Rotation Channel
Generates a motion path using an input channel for rotation to curve the path. This pre-calculates the path by reading the full animation data and applying it over time, relative to the target Position and Positioning Mode selected.

Note that the selected input channel must be enabled and active to function.
As an example, Tween has been applied to Local Rotation Y to create a simple oscillating movement from -90 to 90 degrees.

Using this rotation as the input channel for Flyby results in a S shaped curve, following the rotation of the object. Randomization could be added to Tween for more variability, or a keyframed animation channel could be used instead for more control.

Time Offset
Shifts the input channel forward or backward in time. If the value is 0, the rotation channel aligns to the Flyby channel as they appear in the Timeflow view, accounting for local and world offsets on each of the channels and objects.
Use Time Offset to look ahead or lag behind the actual rotation of the object. This may be for subtle or accentuated for effect.
Steering
Controls how much rotation affects path curving. The default value is 1, which means every degree of rotation is represented in the curve 1:1.
Lower the steering value to reduce the curviness of a path, or set a higher value (up to 2) to make path curves more eccentric.
Velocity Mode
Determines the speed of the object, affecting the overall distance the path covers.

Constant
Sets a fixed velocity maintained throughout the animation.

Use Constant velocity for trains and planes and other Flybys that don't need any variation in speed.
Start to End
Generates a velocity curve with a beginning, middle, and end. This spans the flyby duration the same way no matter which positioning mode is used.

Enable Ease In Out for smooth quadratic interpolation, or disable it for linear interpolation.
Negative velocity values are allowed and result in objects traveling in reverse. In the generated motion path this appears as a hard angle where the object changes direction.
This is the point at which velocity is 0, as it transitions from a positive to negative value. For more control over velocity, see Velocity Channel below.
Animation Curve
Uses a Unity Animation Curve to map the velocity over the duration of the path.

Click in the Velocity Curve box (green line above) to open the curve editor. Use one of the presets at the bottom or create your own.

Velocity Channel
This method of setting velocity offers the most control with full curve editing in the Timeflow view.

When this mode is selected, a new Velocity channel is automatically added.

Velocity is a standard keyframe channel and can be used as such, including the ability to link it with other channels and full curve editing and looping capabilities. The velocity is measured in world units and controls the speed of the object throughout the path (units per second).

Gizmos in the Scene View
When the game object is selected, Flyby displays its motion path in the Scene view. The position and orientation of the path may be edited using the gizmo handles.

Move Tool
When the Move Tool is selected (in Unity's main toolbar) the Flyby position may be edited using the position handle, as shown below. This works the same as a regular position handle, but sets the Flyby Position, rather than the transform position (which is determined by path interpolation).

Rotate Tool
Switch to the Rotate Tool to adjust the path Orientation. This affects the overall direction of the path, however does not rotate the object. To move and rotate a whole flyby path and object at once, see the tips below on parenting.

Further Possibilities
With the power of simple keyframing and combining Flyby with other generative behaviors such as Tween, it's possible to create unlimited variations with complex results quickly and easily.
Using Parenting
Flyby works with hierarchical offsets, making it possible to move, rotate, and scale the entire path with the object. Add parent objects as needed to separate and layer transforms.
Avoid Non-Uniform Parent Scaling
If the inherited scale is non-uniform this may initially appear to squash the motion path, but as soon as the vector path is rebuilt it corrects itself to uniform scale. This is due to the way paths are constructed in world space and converted back to local space. Flyby still functions but this is an odd situation best to avoid.
Using Multiple Flybys
Apply more than 1 Flyby to an object to create stack animations end to end or spaced out in time.


Last updated