his tutorial will guide you through using the "Rotate Spot When the Space Starts" snippet, which allows you to automatically rotate objects (referred to as "spots") in your VR space when the scene begins. This snippet offers options to customize the rotation angle, duration, easing type, and looping behavior, allowing you to create smooth and continuous animations.
Purpose of the Snippet
The "Rotate Spot When the Space Starts" snippet is designed to trigger a rotation animation on selected spots within your XR scene as soon as the scene begins. This feature is useful for creating visually engaging scenes, such as rotating products in a virtual showroom, spinning objects in an educational demonstration, or simply adding subtle motion to enhance immersion.
Setting Up the Snippet
This is the Snippet Window with the various fields. We will go through these step by step.
1. Choose the Spot(s) to Be Rotated
The first step is to select the spots that you want to rotate when the scene starts. This field allows you to choose one or more spots in your scene that will be rotated. These could be any objects that you want to animate with a rotation, such as 3D models, images, or other interactive elements.
2. Degrees in X, Y, and Z
Define the amount of rotation you want to apply to the selected spots along the X, Y, and Z axes. Enter the desired rotation angles in degrees for the X, Y, and Z axes. For example, setting '90' for the X-axis will rotate the spot 90 degrees around the X-axis.
3. Use X, Y, and Z as target rotation
You can specify whether the new rotation should be treated as an absolute position or relative to the current rotation. When enabled, the spot will rotate to the exact specified angles specified. Otherwise, the rotation will be applied relative to the spot's current rotation.
4. Set the Animation Duration
Control the duration of the rotation animation. Set the duration for the rotation animation in seconds. This determines how quickly the spot rotates to its new orientation.
5. Choose an Easing Type for Smooth Transitions
Easing functions create smooth transitions in the animation, making the rotation feel more natural. Select from a variety of easing options, such as Linear, inBounce, or inOutSine, to control how the rotation accelerates and decelerates during the animation.
6. Loop Type
Choose the looping behavior:
- None: No looping.
- Normal: Restarts the animation from the beginning each time.
- Incremental: Continues the rotation in the same direction.
- PingPong: Reverses the rotation direction after each iteration.
7. Number of Playback
Specify how many times the animation should play. Use '-1' for an infinite loop.
Conclusion
The "Rotate Spot When the Space Starts" snippet in Fectar Studio is a powerful tool for adding dynamic rotation animations to objects in your VR scenes. By setting the rotation angles, duration, easing, and looping options, you can create a wide variety of effects that enhance the interactivity and visual appeal of your experience. Experiment with these settings to craft the perfect rotation behavior for your XR scenes, making them more engaging and immersive for users.