Introduction
In Fectar Studio, dynamic and interactive XR scenes can significantly enhance user engagement and experience. One effective way to introduce interactivity is by animating objects within the scene. This tutorial will guide you through using the "Move Spot When the Space Starts" snippet, a powerful tool that allows you to move objects (referred to as "spots") within your XR space when the scene starts. This snippet enables you to customize the movement's direction, duration, and easing type, as well as specify looping behaviors for continuous or repeated animations.
Purpose of the Snippet
The "Move Spot When the Space Starts" snippet is designed to automate the movement of spots within your XR scene as soon as the scene begins. Whether you're creating a guided tour, an educational experience, or an interactive game, this snippet can help bring your XR space to life by adding fluid motion to specific objects.
Setting Up the Snippet
This is the Snippet Window with the different fields. We will go through these step by step.
Step-by-Step Guide
-
Select Spots to Move within Your VR Scene
The first step is to choose which spots you want to animate. This field represents the spots you wish to animate. In Fectar Studio, you'll be able to select one or more spots from your scene.
-
Define the Movement's Direction and Distance
Next, define how much you want the spots to move along the X, Y, and Z axes. Enter the movement values in centimeters. These values determine how far the spot will move along the X, Y, and Z axes.
In the checkbox, you can specify whether the new position should be treated as an absolute position or relative movement. When enabled, the spot will move to the exact position specified by Movement. Otherwise, the spot will move relative to its current position.
-
Set the Movement Duration and Choose an Easing Type for Smooth Transitions
Control how long the movement animation should take. Set the duration of the animation in seconds. This controls how quickly the spot moves from its starting point to the new position.
Easing functions control the acceleration and deceleration of the animation, giving it a more natural feel. Choose from various easing functions, such as Linear, inBounce, or inOutSine, to control how the animation starts, progresses, and ends.
-
Configure Looping Behavior to Repeat the Animation
Decide if the animation should repeat and how it should loop. Select the type of looping behavior:
- None: No looping.
- Normal: Restarts the animation from the beginning each time.
- Incremental: Continues the movement in the same direction.
- PingPong: Reverses the movement direction after each iteration.
Specify how many times the animation should play.
IMPORTANT: Use
-1
for an infinite loop.
Conclusion
This snippet provides a versatile way to animate objects within your XR scenes, adding a layer of interactivity that can greatly enhance user experience. Experiment with different settings to create the exact animation behavior you desire.