State Machine Builder User Interface

Created by Nitin Solanki, Modified on Thu, 8 Sep, 2022 at 4:32 PM by Nitin Solanki

State Machine Interface Description

  1. State Machine Tab

Tab to enter the State Machine creator panel

  1. Add State

Add an empty state to the scene

  1. Add Transition

Adds a transition between two states. Transitions cannot be added between states and the Always Running State.

  1. Entry Node Dropdown

Entry node selection is a dropdown of all of the states inside the State Machine Authoring Space. This is the first state that the simulation will start in. Any states prior to this will not be called even if they show up earlier in the line up of states in the entire machine unless a transition would ever take it back to the earlier point in the state machine.

  1. States Button

Brings up the information on the currently selected state, including Triggers and Conditions.

  1. Attributes Button

Brings up the attributes information of all entities in the scene. Any default attributes of entities are automatically generated and accessible here. You can also add your own attributes in this panel as well.

  1. Always Running State

A unique state where execution of Triggers and Conditions are checked at all actions of the end user. This is not able to be linked to any other state.

  1. Zoom In/Out Buttons

Will move the view of the State Machine Authoring Space either in or out depending on which button is pressed.

  1. State Machine Authoring Space

The space in which States and Transitions are arranged.

Created States And Transition Interface Description

  1. State Name

Identifier of the given state. This will show up on the Entry Node Dropdown and in the Transition Description field. The state itself can be selected to see what happens when the state is entered. This can be empty.

  1. State Deletion

Button to delete the given state. This will also automatically delete any transitions coming from or to the given state.

  1. Transition Link

An arrow showing the connection between two states. Can be selected to show the conditions or triggers for the transition. If no condition or trigger is given then the transition will happen automatically.

  1. State Description

An area where the author can write out a description of the state. Has no bearing on the execution of code but it is useful for identifying what the state does without having to select the state in question.

Created Attributes Interface Description

  1. Attribute Deletion Button

Button to delete a given attribute. Will be disabled on default Values that are automatically generated for all VOs and VPs. This button will be gray and have the text “*This is a default Value” if it is not able to be deleted.

  1. Attribute Creation Button

Creates a new blank attribute.

  1. Attribute Name

The identifier of the given attribute. It does need to be assigned to an entity. The default is the entity of the space. We recommend that every Attribute on each entity have a unique identifier but this is not required by the system.

  1. Entity Name

Name of the entity the attribute can be found under. Will default to the entity of the space.

  1. Type Identifier

The type of the given attribute. This can be any of the following values: Integer, Float, Boolean, String, or SMEntity. SMEntitys are not currently fully supported and are coming in a future version.

  1. Type Value

The value of the attribute at the start of the simulation. The value will automatically be forced to conform to the type specified by the Type Identifier.

Created States Interface Description

  1. States/Transitions Swap Button

A button that will change the UI from that of the Attributes tab to that of the States or Transitions tab.

  1. State Name Value

The given name of the selected state.

  1. State Entry Actions

The value of the attribute at the start of the simulation. The value will automatically be forced to conform to the type specified by the Type Identifier.

  1. Add Additional Actions Button

The value of the attribute at the start of the simulation. The value will automatically be forced to conform to the type specified by the Type Identifier.

  1. Action Type Values

The value of the attribute at the start of the simulation. The value will automatically be forced to conform to the type specified by the Type Identifier.

  1. State Exit Actions

The value of the attribute at the start of the simulation. The value will automatically be forced to conform to the type specified by the Type Identifier.

Default Attributes

    There are a variety of attributes that are automatically added on to any asset that is added to the scene. Every created object will have these attributes generated and can be adjusted at the time of the sim creation in the Attributes tab or adjusted during the simulation with the state machine. All default attributes cannot be deleted from an object and will have the text “*This is a default Value” in the upper right corner of the attribute.

Visibility

    The Visibility attribute determines whether an Entity is active or not. If this attribute is false the Entity will be temporarily removed from the space and no functionality will work with the object until the Visibility is set to true. This has the additional effect of making any object with the Visibility attribute set to false as invisible to the user.

Grabbed

    The Grabbed attribute is a read only attribute that you can use to see if an object is currently grabbed by the user. If an object is currently held the value will be true, and false if it is not.


Snapped

    The Snapped attribute is used to change an object's location and parenting. By default an object is unsnapped. To set a Snapped attribute you need to select a different VO, and select a Hitbox on the VO. Adding Hitboxes is outlined in “How to Create a Hitbox with a Virtual Object” section. Doing this will cause the object's initial position, and rotation to change to that of the selected Hitbox and make the Entity the child of the selected VO Instance.

Kinematic

    The Kinematic attribute is used to make an object no longer be affected by external forces, such as gravity. If the Kinematic attribute is set to true an object will not be able to be moved by another object pushing into it and if set or released in the air it will remain in the location it was released.

Grabbable

    The Grabbable attribute defines whether an object is currently able to be interacted with utilizing the Grab function. This attribute must be true to utilize any of the GrabType attribute functions.

GrabType

Basic

    The GrabType will always default to the Basic value. The Basic grab type makes it so that when an object is grabbed it will follow the grabbed location, the controller in VR or the grab point on Desktop/Web. In VR the grabbed object will not pass through objects and will be released from the grab or will push other objects around if they are not Kinematic when pushed into them with enough force.

Slider

    The Slider GrabType changes the behavior of the grabbed object so that it slides along the designated axis for the length of the distance before stopping as if it is on an invisible rail. The possible Axis to select are X,Y, and Z. The length can be any value and can be negative or positive. The Max Length is given in meters. The Initial Position is a normalized value between 0 and 1 of how far along the slider you want it to be. A value of 0 would have it begin at its initial position, a value of 1 would have it at the end specified by the Max Length, and a value of 0.5 would have it halfway along the total possible length. 


Rest Position and Rest Threshold are only usable in VR experiences. The Rest Position and Rest Threshold is a normalized value between 0 and 1 of how far along the slider you want it to be. A value of 0 would have it set at its initial position, a value of 1 would have it at the end specified by the Max Length, and a value of 0.5 would have it halfway along the total possible length. The Rest Position is the location where, if the Rest Threshold is not reached, the Entity will return to. The Rest Threshold is the value that must be exceeded or the object will return to the Rest Position on the grab release.


On a Desktop or Web experience an object of the Slider GrabType can be engaged with the Grab Button and then moved with the K and L buttons on the keyboard. K will move the object in a negative direction and L in a positive direction.

Rotator

    The Rotator GrabType changes the behavior of the grabbed object so that it rotates along the designated axis for the degrees specified by the Min/Max Angle. The possible Axis to select are X,Y, and Z. The Min/Max Angle can be any value and can be negative or positive. The Initial Angle is a normalized value between 0 and 1 of how far along the rotational values you want it to be. A value of 0 would have it begin at its Min Angle, a value of 1 would have it at the end specified by the Max Angle, and a value of 0.5 would have it halfway along the total possible rotational values. 


Rest Position and Rest Threshold are only usable in VR experiences. The Rest Position and Rest Threshold is a normalized value between 0 and 1 of how far along the rotator you want it to be. A value of 0 would have it set at its Min Angle, a value of 1 would have it at the end specified by the Max Angle, and a value of 0.5 would have it halfway along the total possible rotation. The Rest Position is the location where, if the Rest Threshold is not reached, the Entity will return to. The Rest Threshold is the value that must be exceeded or the object will return to the Rest Position on the grab release.


On a Desktop or Web experience an object of the Rotator GrabType can be engaged with the Grab Button and then moved with the K and L buttons on the keyboard. K will move the object in a negative direction and L in a positive direction.

Transitions by Triggers and Conditions


Transitions are used by the State Machine to create a simulation and control what is available to the End User at the time of the experience. These transitions are visualized by the arrows drawn between all the states. States can only be reached by these connected transitions with the exception of the Entry State which is the state that the simulation will begin in. Each Transition can have one Trigger and as many Conditions as you desire.

Use

    Use Triggers are utilized by either the entire object or utilize the Hitboxes feature to allow precise locations and sizes to be targeted by the End User. If you wish to have the object only be usable when grabbed the Use Category must be set to Virtual Object. The HitBox Use category can only be used if the object has Hitboxes located on it.

  

Snap

    Snap Triggers are used to force an object to be set to a known location, orientation, and rotation. The three properties of a Snap Trigger are the Owner, which is what needs the Hitbox and what the Entity object will attach to, a Hitbox which must be present on the Owner object, and an Entity. After a Snap Trigger is performed the Entity will follow the owner’s movement if any is applied. If the Entity is Grabbed it will remove the snap relationship between the Owner and the Entity.

Proximity

    Proximity Triggers detect when objects come within a specified distance to the End User defined in meters. Imagine that there is an invisible sphere with a radius of the specified distance surrounding the object and when the End User breaches that sphere the Trigger will activate.

Collide

    Collide Triggers detect when the two specified objects come into contact with each other.

Utterance

    Utterance Triggers listen for the Intent authored by the Sim Creator. When any of the Utterances in the Voice Intent are a match the trigger is activated. To add more Utterances to the Intent press the  button and the panel to enter them will appear. Type in your full utterance and press the  button to add it to the list. When you are finished press the button to store all of your Utterances in your Intent.

UseRelease

    UseRelease Triggers listen for when the End User stops using an object. It is recommended that UseRelease Triggers are utilized immediately after a Use Trigger or used in the Always Running State Machine as this trigger is not usable if there is no Use function on the UseRelase object. Currently this can only be utilized with the Use Category of Virtual Object.

Conditions

Conditions utilize the created Attributes of the objects in your simulation to check and see if they match your desired outcome before allowing an action to occur. Conditions are able to be structured like if/and/or statements in programming to create a variety of complex situations being checked before allowing the Transition or State Action to take place. To utilize Conditions first select an Entity from the drop down list. This will be populated with every VO or VP in the space. Then, select an Attribute from the dropdown list. This will be populated with every Attribute on the selected Entity. Then, select the appropriate Operator for your desired condition and then set the Value for comparison. When the specified attribute’s value fulfills the condition it will allow the state transition to occur if all other parameters are met. You are able to have as many Conditions as you desire in any state so do be careful to not make impossible or contradictory Conditions that would prevent your simulation from being traversable.



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article