LogoLogo
HomeDiscordVideo TutorialsBuilder Opportunities
  • Welcome to MONA
    • What is a Space?
    • Unity Overview
  • ⬛Create
    • Getting Started Building
    • MONA Crash Course
      • Setting up MONA in Unity
      • Introduction to Unity
      • Setting up Simple Assets
      • Metaverse / WebGL Limitations
      • Creating 3D Assets
      • Applying Materials & Unwrapping UVs
      • Importing Assets into Unity
      • Adding Colliders
      • Adding Lighting
      • Adding a Custom Skybox
      • Setting up Canvases
      • Uploading to your Wallet
    • Building Spaces
      • Space Limitations
      • Create your Space
        • Space Overview
        • Colliders
        • Materials
        • Portals
        • Canvases
        • Artifacts
        • Add a Custom Skybox
        • Test Your Space
        • Troubleshooting
      • Improve your Space
        • Lightmaps (Unity Lightmapper)
        • Light Probes
        • Reflection Probes
        • Animation in Unity
        • Importing Animation
        • Player Property Volumes (PPV's)
        • Warp Volumes
        • Adding Audio
        • VRM Switcher
        • Custom Canvases
        • Embedded Video
        • User Interface (UI)
        • Creating Custom Shaders
        • Imported Assets
        • Lightmaps (Bakery Asset)
      • Optimise your Space
        • Prefabs
        • 3D Asset Specs
        • Optimizing your Space
      • Adding Interactivity
        • Visual Scripting
          • Web Request Node
        • Mona Reactor
          • Creating Animation
          • Using Animator
          • The Reactor Component
          • Reactor Overview
      • MONA Tools
        • Template Utility
        • MONA Capture
        • Light Probe Generator
        • VOX Importer
      • Submit Your Space
        • Submitting your Space
        • Creating an Image & Video Preview
        • QA Process
        • Mint Your Space
      • Update your Space
      • Frequently Asked Questions
      • Troubleshooting
    • Creating Assets
      • Asset Requirements
      • 3D Asset Types
      • Asset Creation Approaches
      • Optimizing your Mesh
      • GLB Considerations
      • Example - Cyberpunk Car
    • Creating Avatars
      • Getting Started with VRM
      • VRM Requirements
      • VRM Creation
        • Using Mixamo for Rigging
        • Adding Custom Bones to the Rig (Optional)
      • Creating your Avatar using UniVRM
        • Importing UniVRM into Unity
        • Creating the VRM using UniVRM
        • Adding Spring Bones in UniVRM (Optional)
      • Creating your Avatar using 'VRM for Blender'
        • Adding 'VRM for Blender' into Blender
        • Using 'VRM for Blender' for Rigging
        • Adding a Material
        • Assigning VRM Details
        • Exporting the Avatar
      • Uploading your VRM
      • Using Avatars in WebAR
      • Submitting your VRM to the Mona Marketplace
      • Mint Your Avatar
      • Troubleshooting
    • Resources
      • MONA Claim Asset Requirements
      • Unity Wallet SDK (Alpha)
      • MONA Playground
      • MONA Tutorials
        • Retrowave Modules
      • Asset Resources
        • 3rd Party Assets
        • Textures
        • Shaders
        • 3D Assets
        • Audio
        • Tools
        • Tutorials
      • MONA Library
        • MONA Library Submission
      • Useful Unity Packages
      • Updating the Template SDK
      • Importing Mozilla Hubs Spaces to MONA
      • Importing AltspaceVR spaces to MONA
    • MONA Marketplace
  • ⬛Explore
    • How to Use MONA
    • Using VRM Avatars
    • Audio Settings
    • Explorer's Frequently Asked Questions
  • ⬛Collect
    • Setting up a wallet
      • Delegating a Wallet
    • Own a Space
      • Host an Event
      • Uploading your Images
      • Add Images to a Canvas
      • Live Music Feed
      • Token Gated Access
      • Minted 3rd Party Assets
    • MONA Create
      • Create FAQ
    • Live Streaming in MONA
      • Setting up OBS Studio
      • Livestream using OBS Studio
      • Livestream using a Mobile Device
      • How to Stream Using Twitch or YouTube
      • Add a Livestream to a Canvas
    • Collector's Frequently Asked Questions
  • General Resources
    • Web3 Introduction
    • How to sell Art in Web3
    • Game Dev Glossary
    • Buildathons / Challenges
      • 3D Asset Buildathon (Current)
        • Frequently Asked Questions
      • Emote/Emoji Challenge (Completed)
      • Stream Challenge (Completed)
      • Custom Avatars (Completed)
      • Build : NY Challenge (Completed)
      • Sculpture Challenge (Completed)
      • Portal Hub (Completed)
      • Interact (Completed)
      • The Renaissance (Completed)
Powered by GitBook
On this page
  • The Animator Node Graph
  • Node Graph
  • Layers and Parameters
  • Parameters
  • Transitions
  • Simple Reactors

Was this helpful?

  1. Create
  2. Building Spaces
  3. Adding Interactivity
  4. Mona Reactor

Using Animator

PreviousCreating AnimationNextThe Reactor Component

Last updated 2 years ago

Was this helpful?

Understanding the Animator component is crucial to navigating the Reactor process as this is what Reactor will take control of once an event is triggered.

Reactor can modify the parameters in the Animator component, which can trigger different animations. These are set up using the Node Graph in the Animator window.

A simple example would be an if statement. If the player walks into collider set the OpenDoor parameter to true, which will play the animation to open the door.

The Animator component is usually added automatically if you use the method discussed in the Animation docs found in the previous tutorial. It is possible to add it manually as well.

With the Animator component applied, you should be able to see the animations you have created in the Animator window. This is also called a Node graph.

  • If the Animator Window is not visible, you can go to Window Menu > Animation > Animator. Note how the animation nodes aren't visible until you click on the asset with the Animator component with animations applied.

  • If you haven't already, you need to create multiple animations to switch between. If you are animating within Unity, you can use the 'Create New Clip' in the Animation window.

The Animator Node Graph

The Animator Node graph is where you set up all your animations to control using the Reactor Component. With your animated asset selected, going to the Animator Window will give you something like the following :

Node Graph

To the right of the window you have the Node Graph itself. this houses all the animations you have created on the asset and a few other nodes.

The Orange node (with 'Cube_Idle' above) is the default state animation. This is the animation that plays when you start the Mona space. This could be an idle state, base state, or similar state that your asset will be in when the space loads. The name of this node is based on the animation file name initially.

The Grey nodes (in this case with 'Cube_Move') are all the separate animations you have created with the Animation tool. The name of these nodes is based on the animation file name initially.

The Any State node allows us to switch to an animation from any other animation. If you have a more complicated node graph, this is useful to clean things up for organisation.

Entry/Exit nodes are less important apart from the entry node leading to the Default state node.

  • If you want to change which animation is the Default animation, right click the node and select 'Set as Layer Default state'.

  • To move nodes around the graph, just left click and drag as needed.

Layers and Parameters

At the top left you have two buttons, Layers and Parameters.

Layers Tab - This is less important as it is used to allow you to layer animations over other animations. This is not usually used unless you have some advanced use of the animation tools.

Parameters Tab - This is used to create parameters that allow you to trigger switching between animations in the Animator window. You will need this tab to create Reactor events.

Parameters

Parameters are where a lot of the power behind Reactor can be.

A simple example would be to create a parameter that is used to note if a door is open or not. This is a great use of a true/false parameter, also called a Boolean. We can set this parameter using the Reactor component when an event happens, that way we can switch between animations.

  • Select the Parameters tab in order to add custom parameters

  • Add an example parameter that we can use

  • Pay very close attention to the spelling and case of the parameters you set as this will be important when adding them to your Reactor component later. Come up with a standard and stick to it to reduce issues.

Transitions

To trigger an animation, we need to transition between them. And to do that we need to add a transition between the animations.

  • Right click on an animation and select 'Make Transition', then drag and select the animation you would like to transition to.

  • Once the transition is made, you can select the transition arrow in order to set how the transition is done in the Inspector window.

  • 'Has Exit time' means the transition will happen at the end of the animation. Usually you will want the transition to happen as soon as the event is triggered, so this is usually turned off. That said you can use this to have an animation go to a different animation automatically (without needing Reactor to trigger it) or to transition to an animation after a certain point in the animation. Once turned off Unity will give you a warning saying there is no situation that the transition can happen, and this is where we add our Parameter condition.

  • Under the Conditions section, use the '+' sign to add a condition. This will add a parameter condition that we can reference with the Reactor Component. Select the parameter that you would like to reference. So basically If 'isDoorOpen' is true, play the 'Cube_Move' animation. And we can set 'isDoorOpen' to true when the player walks into a collider with Reactor.

Now that you have your animations created, your parameters set, and the transitions applied, you can move to the next tutorial in order to set up the Reactor component to trigger them!

There are some useful techniques that you could use to improve your Reactor experience however.

Simple Reactors

Things like doors, elevators, and platforms don't really require a looping animation to function. A door is either closed or open, and the animation is simply the transition between one to the other. Animator can do that animation for you, and you just have to focus on the end points as single keyframes such as the door closed, and the door open.

Doing it this way also allows you a little more control over how it transitions by modifying some of the values in the settings such as the transition length.

These can apply to position, rotation and scale. Even color, audio volume or other simple blends from one state to another.

⬛
Add the Animator Window if it is not available
'Create New Clip' in the Animation Window to add animations
The Animator Window
Add a parameter to the Animator
Making transitions between animations
Turn off 'Has Exit Time' (usually)
Add a condition to start the transition
Use single frame animations for simple reactors
Adjust Transition Length.