Non VR Animation

NonVRAnimation Documentation

The NonVRAnimation class represents an animation that can be played on a MetaverseInteractable object when it is interacted with by a non-VR player.

Namespace

MetaverseCloudEngine.Unity.XR.Components

Public Properties

  • string name: The name of the non-VR animation.

  • float cooldown: A cooldown time used to prevent another animation from being played until this time passes.

  • bool networked: Whether this animation should be played over the network.

  • AvatarPlayableAnimationPreset preset: The animation preset to use.

  • bool isSequencable: Whether this animation can be selected using the PlayNextNonVRAnimation method.

Usage

The NonVRAnimation class is used by the MetaverseInteractable component to define animations that can be played when the interactable is interacted with by a non-VR player.

Example:

You can use the NonVRAnimation class to define an animation that is played when a player picks up a ball. To do this:

  1. Add the MetaverseInteractable component to the ball GameObject.

  2. In the inspector, expand the "Non VR Animations" foldout.

  3. Click the "+" button to add a new NonVRAnimation.

  4. Set the name property to "Pickup".

  5. Set the preset property to the animation preset that you want to use.

  6. The "Pickup" animation will now be played when a non-VR player picks up the ball.

Additional Notes

  • Non-VR animations are played on the player's avatar.

  • Non-VR animations can be networked, meaning that they will be played on all clients.

  • The PlayNextNonVRAnimation method can be used to play the next available non-VR animation in a sequence.

Last updated