Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To build an state machine event, open the Atoms UI and make sure to have selected the "StateMachines" tab.



Building your state machine

Click on "Add", then double-click on the state machine you just created. 
Rename it to "robotStateMachine".

Right click in on the state machine viewport and select "Add Animation State".
Select the new state and change its name to "run" .

Leave the "Id" to 0 and click on "Add Clip". From the clip list, select the clip you exported in the previous section

Click on the "Register" button or press CTRL+S.

Your state machine is ready to usebe used.


More about the state machine editor

In the state machine editor there's a variety of other things you can do. For a full list of actions that you can perform in the editor please check the quick help at the bottom right of the GUI.

The Inspector

The inspector is where you set your clips for a state or a transition clips.

In case you're setting up an animation state, you have to give it an id which will later be used by Atoms Behaviour Modules. Each animation state need to state in the same state machine must have a different id.

You can assign more than one clip to each animation state or transition.
There are three different merge modes:

  • Exclusive : only the exclusive clip will be played. This mode has the highest priority. If you have an exclusive clip all the other clips will be ignored. If you have more than one exlusive clip only the first one will be used.
  • Merge : all merge clips will be merged together. This has higher priority over the random mode. Having only a merge clip is like setting its mode to exclusive.
  • Random : one of the random clips in the list will be played.

Finally there are also three different motion modes: Straight, TurnLeft and TurnRight.
Only clips with the same motion mode will be merged togheter, randomized or will exclude each other.
The angle and blend values are in degree. 

At each frame your agent direction changes and the angle described by the agent direction of at the current frame and the direction of at the previous frame will be used by the blending system.
For instance, when setting a TurnLeft clip with angle value to 1 and blend to 2, our agent will start blending the straight Straight clip with the TurnLeft clip when the mentioned angle will be between from 1 to 3 degrees (3 is simply the angle value plus the blend value). When the angle will be more than 3 the TurnLeft clip will be played.
The angle and blend values are in degrees.  

Transitions

When connecting two animation states you can select the transition and assign a transition clip with within the inspector.
A light blue dot will appear on your transition in the editor as soon as you assign a clip to a transitionit

If you don't specify a transition clip between two states and in your simulation you pass from one of those to the other, Atoms will do a straight blend between those clipsthem

For Atoms ther'se there is no difference between having a transition without clips and having no transitions transition at all between two states.