比較バージョン

キー

  • この行は追加されました。
  • この行は削除されました。
  • 書式設定が変更されました。

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 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 be 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 please check the quick help at the bottom right of the GUI.

The Inspector

The inspector is where you set your state or 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 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.

At each frame your agent direction changes and the angle described by the agent direction at the current frame and the direction 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 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 within the inspector.
A light blue dot will appear on your transition in the editor as soon as you assign a clip to a it. 

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 them. 

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