đ¸Auto Bank
Auto calculate pitch and roll based on object movement
Last updated
Auto calculate pitch and roll based on object movement
Last updated
To add Auto Bank, right-click an object and select:
Add Automation > Auto Bank
Auto Bank is most commonly used to add extra roll or pitch to an object based on its movement. This is determine by the object's velocity, calculated as the difference in position each frame.
Play Timeflow to preview Auto Bank accurately. Auto Bank relies on relative change in movement as it occurs and cannot calculate banking at arbitrary times. Therefore, whenever there are abrupt changes to the current time (such as when dragging the playhead), auto bank calculation may be incorrect.
To see Auto Bank perform properly, allow Timeflow to play uninterrupted. It may also be necessary to rewind sufficiently so there is enough lead time to fully apply smoothing.
Select the game object and view it in the Inspector view to configure settings.
For common features please refer to Menu Bar and Update Settings.
Determine the input source of movement from which auto bank is calculated.
The input does not have to be 'movement' per se and can be any numeric channel input. Auto Bank simply reacts to relative changes, whatever the input source may be.
Enable this to force calculation in world space, otherwise positions are treated as local coordinates.
When using a Motion Path as input, turn off World Space to follow the path contours. Banking is then calculated from the turning direction relative to the heading of the object.
Uses the object's transform position to generate banking. Select the axis of movement (position) to generate banking from.
Typically side-to-side movement (X) is used to calculate roll, whereas pitch is calculated from up-down movement (Y). Other combinations may be used to create dynamic spinning and spiraling effects based on movement.
Use a Motion Path from the same or different object with optional Time Offset. The default offset is 0.25 seconds to allow a bit of lead time to anticipate banking.
Time Offset may be adjusted to either look ahead at upcoming turns and lean into the curve (like a pilot or driver would do), or time offset can be negative to delay banking (reacting to rather than anticipating each turn).
If the motion path is on a separate object, Auto Bank still rotates as expected, however the object's position remains unaffected. This makes it possible to decouple the banking movement from the position.
This mode uses another channel (on the same object) as an input value to calculate Auto Bank. This can be a position channel, or any numeric data type, though just 1 axis or float value is used as input.
Use this mode if the object position is animated on other channels, whether separately or combined.
This mode can also be used for more creative effects by adding a Data Only channel as the input, and then using Channel Link to direct channels from other objects or calculate input data.
Channel Value mode also supports Time Offset, which works similarly as described above for the Motion Path mode.
This multiplies the movement input value, controlling the overall intensity of banking.
A lower scale value results in more subtle banking overall, while increasing the value amplifies it. This can vary quite a bit depending on each situation where Auto Bank is used, so may take some experimentation to find the right settings for the effect you wish to achieve.
Determines the minimum change of input (i.e. movement) required to register a change. If the relative change in input value (from any Input Mode) is below the Threshold, it is ignored.
Increase the threshold to make Auto Bank less sensitive to minor object movement, or lower the threshold to make auto bank more sensitive.
This controls the amount and degree of rotation, applied to the Axis selected. The Banking value affects how much banking is applied over the change in movement. A lower value reduces the effect, and a higher value increases it.
This sets the maximum rotation value allowed for this axis. The value is enforced as both a negative and positive rotation.
Use this mode if you wish to set explicit minimum and maximum values. This will keep the banking rotation within the rotation range specified.
Use this mode to allow banking to rotate endlessly.
If no rotation limit is enforced, it is possible for rotations to go to infinity. Since infinity is not a real number, this condition will result in the object rotation being reset to 0. This ca be avoided by using a very high limit, or adjusting the movement scale and banking values to keep the rotations within a reasonable range.
If enabled, the banking rotation is reset to 0 whenever Timeflow rewinds or loops. However, for looping paths you may wish to disable this for seamless banking when looping.
This sets the rotation axis to apply banking too.
Auto Bank can only generate 1 axis of rotation, however you may apply multiple instances of Auto Bank to create behaviors for pitch, roll, and yaw. If applied to the same object, the Orientation should only be set on the first one.
If Invert is enabled, the value range is swapped.
Enable Invert to make the object bank in the opposite direction. This determines whether the object is leaning into or away from turns.
Optionally sets the base rotation of the object.
Use this to adjust the heading so the object is facing the direction desired.
If Orientation is off, the Auto Bank behavior applies additively with existing rotations on the object. Otherwise if Orientation is on, it overwrites the object's rotation when applying banking.
Auto Bank vs Rotation Conflict If Auto Bank is conflicting with other object rotations, you might consider applying Auto Bank on a parent or inserting a new transform to isolate the banking movement from other rotations.
Applies temporal blending to create smoother more graceful banking.
Use a higher value of Smooth Time to create a slower auto banking response (sluggish), and a lower value to speed up banking response time (rapid).
Be aware that setting Smooth Time to zero or a very low value is likely to result in abrupt and sometimes unpredictable changes in banking rotation. If even a small amount, smoothing is recommended for best results.
If enabled, the banking rotation accumulates over the distance travelled (or based on the change of the input value). Use this option for objects that spin or corkscrew.
To fully utilize this effect and allow an object to spin more freely, enable No Limit or increase the rotation limit to an acceptable amount.
This multiplies the banking amount when cumulative is enabled to reduce the banking so that it is easier to control. Since cumulative mode amplifies banking, the dampen amount is used to counteract that. This value may be adjusted to increase or decrease the rate.
The final rotation is checked for NaN (not a number) values in case infinity is reached. If this occurs, the rotation reverts to 0. If this is an issue in your setup, you may consider setting a max value.
If Auto Bank is applied to the same object it bases movement from, it may be helpful to use Late Update, set in the Update Settings. This will result in Auto Bank updating after all other behaviors have been updated. This can fix jitter or shaking behavior that may occur otherwise.