# Animated Objects

In order to have animation within your world that is in sync amongst all users in there, you'll need to use AnimatiorView. AnimatorView allows you to play and swap between animations and sync them with all the users in the area.&#x20;

Add AnimatorView and GuidComponent to a GameObject. Then, create an object with an animator, unless you already have one, add assign it to AnimatorView's Animator property field.&#x20;

<figure><img src="/files/L2GxYAJsRD2RLzd7gO9A" alt=""><figcaption></figcaption></figure>

To change between different animations to play, call AnimatorView\.Play(animationName). The animationName should coresspond to the name of the Animation asset.&#x20;

Here is a brief explanation on the local variables:

<table><thead><tr><th width="178"></th><th></th></tr></thead><tbody><tr><td>Loop</td><td>Self explanatory. If the animation should start again after it ends.</td></tr><tr><td>Normalized Time Parameter Name</td><td>Name of the parameter in the animator controller used for progressing through the animation. </td></tr><tr><td>Layer Index</td><td>Layer index of the animator.</td></tr></tbody></table>

You'll also need to set up the Animator Controller to work with AnimatorView.

Create an Animator Controller in your project's assets.

Create a parameter of type float in your controller with the same name as your Normalized Time Paramter Name, by default it's "progress".

<figure><img src="/files/h5JGawrABrGCFznE8S8h" alt=""><figcaption></figcaption></figure>

On each state, set the Motion Time to the parameter you just created.

<figure><img src="/files/9Aar1b4qAHxysTiw0W54" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.holofair.app/development/features/animated-objects.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
