States

A State is a stored set of properties that can be activated and transitioned to at any time through either user input, or an event within the experience. States are typically used as building blocks to transition between sets of values.

States in the state clip editor

For more complex transition animations, you may want to use Timelines.

Adding a new State

The best way to add a new state is by creating it inside a Layer, although you can also create independent states if you wish.

The sections below detail how you can create a new state to add interactivity and dynamism to your Mattercraft project.

Adding a new State in a Layer

You should create a new layer if one doesn’t exist.

Creating a new state in a layer

To add a new state in a layer:

  1. Click on the Animations panel to open it up
  2. Click on Layers if it is not already selected
  3. Hover over your Layer until you see the 3 interactive dots
  4. Go to + Add and then New State
  5. Type in your new state’s name and then use the State Clip editor to begin altering the value of node or behavior properties

Giving your states brief but descriptive names will make them easier to manage; particularly when activating them with Behavior Actions or script.

Adding a new State as an independent Clip

Adding a new state as an independent clip

To add a new state as an independent clip:

  1. Click on the Animations panel to open it up
  2. Click on Clips if it is not already selected
  3. Click on the + (plus) icon and then New State
  4. Type in your new state’s name and then use the State Clip editor to begin altering the value of node or behavior properties

You can also add existing states to a layer at any time.

Assigning properties to a State

When you have created a state, you will want to start assigning node property values to it in order to create animation transitions.

Editing the value of properties stored to a state

To assign properties to a state, use the following steps:

  1. Find your State in the relevant Layers or Clip tab
  2. When you find your State, click on it and the State Clip editor will open
  3. Simply adjust the values of your node properties by using the State Clip editor and the Node Properties or Behaviors Panel

Activating a State

At some point in your project, you will want to activate certain states based on a specific interaction, such as user input, Raycaster events, or Trigger events.

To learn how to activate a state in Mattercraft, carry on reading our dedicated documentation:

Next article: Activating States

zapcode branded_zapcode i