đ§Auto Rotate
Rotate to face the direction of travel
Last updated
Rotate to face the direction of travel
Last updated
This behavior aligns an object to face (or otherwise orient itself) in the direction it is moving. This can be used with any object motion, no matter how it is being moved, even if indirectly through parental movement.
To add Auto Rotate, right-click the object in the Timeflow view and select:
Add Automation > Auto Rotate
World Space This behavior uses world space coordinates to calculate absolute position and rotation. Using local space is not applicable, however final local space rotation may be retrieved by accessing transform.localEulerAngles, or by exposing the Local Rotation channel in Timeflow.
For common features please refer to Menu Bar and Update Settings.
Play for Accurate Preview
This behavior is calculated frame-by-frame and requires continuous forward play to accurately calculate rotation. When time skips or rewinds, the resulting rotation may be inaccurate, but auto-corrects upon play.
Enable this option to calculate auto rotation without applying it to the transform.
The main use case for Calculate Only is when rotation data is being relayed through a Channel Link or script for further calculation or to drive effects.
Sets the overall heading of the object. Adjust the orientation to make the object face the intended direction. The default settings assume the +Z axis is forward.
Determines which axis is upward for the object. The default and most common value is (0, 1, 0) however may be changed depending on the situation.
Up Vector may be set to any value though generally expects one of the cardinal directions (0,0,1) or (1,0,0) or (0,1,0) as defined in Unity Vector3. Other values are allowed but may cause odd rotations.
Flips the Auto Rotate direction 180 degrees. This is a quick way to fix an object that is facing the opposite direction than intended.
Applies temporal smoothing to average out movement and reduce bumps and jitter.
A small amount of smoothing (under 1 second) is generally recommended. If zero or too small amount is entered, the resulting rotation may be prone to abrupt changes and jitter due to minor movements and precision errors. Larger values have a dampening effect, making the rotation sluggish.
Restricts which axis are affected by Auto Rotate. This is most often used to fix an object on a plane, or when combining with other behaviors such as Auto Bank.
Each locked axis is assigned the Orientation value as the default.
If all axis are locked, Auto Rotate won't do anything! Unless this is intentional, make sure at least 1 axis is unlocked.
Auto Bank vs Auto Rotate?
At first glance these behaviors may appear to do the same thing, but are quite different in the results produced. While both are based on movement, Auto Bank calculates just 1 axis of rotation from 1 axis of lateral movement, whereas Auto Rotate aligns the object on all axis to face the direction the object is traveling.
Conflicting Rotations?
It is often helpful to apply Auto Rotate on a separate parent transform so that it is isolated and does not interfere with other rotations. This uses the hierarchy to essentially layer transforms atop one another.
This is typically only needed for complex movements, such as when animating a vehicle or a camera rig.