GENERAL
ROTORS
DocumentationBAS 1.0

Node reference / State and selection

State Machine

Select state pose graphs and blend between them when transition rules pass.

Concept

A state machine selects state poses and changes between them through transitions.

In BAS

Each state supplies a pose graph. The default state is entered at startup and after reset.

BAS supports Native transition rules and supported Animator Controller behavior. Their allowed motions, transition methods and settings differ. The State Machine node page lists those requirements.

Example

Use Idle and Move states with transition conditions that select the required motion.

Node

Idle and Run connected in a BAS State Machine
The State Machine canvas shows the states and the transitions between them. Select the image to open it at full size.

How it works

Initial State selects the state used at startup and reset. A state with no connected pose shows a warning and uses the reference pose.

Native behavior uses the BAS transition rules, with timed crossfades or spring responses. Animator behavior uses the supported Unity Animator transition rules and motion clock lanes.

Double-click the State Machine node to open its state canvas. Double-click a state to edit its pose. Select a transition line or label to edit the rule. Drag a label to move it.

For a Native transition with an empty rule graph, select Use Graph Rule to start editing it. Add Time to Blend Out and connect it to the result to fade out near the end of the source animation.

Two movement checks feed the Condition input of a Transition
A transition rule from a locomotion graph. Or makes the transition available when either movement check is true. Select the image to open it at full size.

Inputs and output

PortTypeFunction
State pose graphsInternal posesOne pose graph for each state.
PoseOutputThe active state pose or blended transition contributions.

Settings

SettingDefaultFunction
BehaviorNativeSelect Native or the supported Animator behavior.
Initial StateUnassignedChoose the startup and reset state.
Event ModeAlwaysSelect contributing state events.
StatesEmptyAdd named states and connect the pose in each state.
TransitionsEmptyAdd directed edges in the order required by the transition rules.
Common node controls

Name changes the canvas label. Type identifies the node and is read-only. Advanced shows structural pose connections and retained data.

State settings

SettingFunction
Name and poseGive each state a unique nonempty name. A connected pose supplies its animation. An empty state uses the reference pose.
Speed / Speed ParameterAnimator behavior: set the nonnegative state playback speed and an optional Float multiplier.
Time ParameterAnimator behavior: sample the state at the supplied normalized time without changing its state clock or exit-time tests.
Cycle OffsetAnimator behavior: add a normalized sampling offset. It must be finite and is used without a Time Parameter.
Foot IK / Write DefaultsRetain converted Animator state settings. Conversion chooses the Foot IK clip form. Supported Animator behavior requires Write Defaults on.
Entry / Fully In State / Exit IDsSet semantic feedback IDs for each state stage. Use no more than 32 unique valid IDs per list.

Transition settings

SettingFunction
Source / DestinationChoose the states joined by the edge. A destination must exist.
ConditionsAll saved conditions must pass. An empty list passes. A state-time condition can test the state clock.
Value RuleNative behavior: use one Bool expression instead of the saved condition list. The list must then be empty.
State TimeNative rule: elapsed seconds since the source state started.
State Time RemainingNative rule: seconds left in the most relevant source animation, including its playback speed.
Normalized State TimeNative rule: animation progress, where 1 marks one complete cycle. The result can exceed 1.
Time to Blend OutNative rule: true when the remaining time is at or below the crossfade duration. Use it with a timed Crossfade.
MethodNative behavior: Crossfade or Spring. Animator behavior accepts Crossfade only.
DurationA finite nonnegative crossfade duration. Native uses seconds. Animator can use seconds or normalized source time.
Blend Curve / Custom CurveShape the crossfade target weight. Custom starts at 0, ends at 1 and stays in 0 to 1. Animator requires Linear.
Spring Half LifeNative behavior: the finite nonnegative response time for Spring.
ForceableNative behavior: allow restart of a target that is still contributing.
Any State / Can Transition To SelfAnimator behavior: permit an edge from any state or a restart of the same state.
Has Exit Time / Exit TimeAnimator behavior: require the source motion to cross the normalized exit point.
Fixed Duration / OffsetAnimator behavior: select seconds for Duration and a normalized target starting offset.
Interruption SourceAnimator behavior: choose None, Source, Destination, Source Then Destination or Destination Then Source.
Ordered Interruption / Source PriorityAnimator behavior: restrict interruption to earlier source edges and preserve their source-list priority.

Events

SettingFunction
Highest WeightedUse events from the highest-weighted contributing input.
AlwaysAllow events from all contributing inputs.

Setup example

  1. Double-click the State Machine and add Idle and Move. Open each state and connect a pose.
  2. Set Idle as Initial State. Use Make Transition to connect each pair of states.
  3. Set the transition conditions and blend duration. Connect the State Machine output to the next pose node.

Requirements and limits

  • Animator state motions must be a Clip, synchronized tree or supported Layered Blend. Write Defaults must be on.
  • Animator transitions accept Crossfade with a Linear blend curve.

Editor guides

Reference details

BAS 1.0 reference. Node type: StateMachineNode. Main source: AnimNodes.cs. Defaults also use the node constructor and the shared Editor field definitions.

General Rotors ยท Burst Animation System 1.0