In the previous tutorial, we've already discussed the Interactivity feature—precisely about the Move interaction. Now, we're keeping our promise (yeah, we sure are) to make another one. This time, it's about the Rotate interaction!
All the steps are pretty much the same—but still, slightly different. So, let's cut to the chase and find out how!
Add the Interactivity first. Always.
Before we start, here's a brief about what you should know about this creation: whenever we click or tap on the earth, it will rotate. Here's an example:
So, for starters, just click on the earth.
Then, choose Add Interactivity on the right panel.
This time, let's choose Rotate since we want the earth to rotate—just like the goal we've set earlier.
Then, do the settings!
First off, you can choose the direction of rotation. Here are the options:
- Forward: Rotate to the front along the y-axis.
- Backward: Rotate to the back along the y-axis.
- Turn Left: Rotate to the left along the z-axis.
- Turn Right: Rotate to the right along the z-axis.
- Facing Left: Face to the left along the x-axis.
- Facing Right: Face to the right along the x-axis.
As we want the earth to keep facing to the left, let's just choose Facing Left.
And then, you can also choose the target object. You can make use of it when you have at least two objects in your scene or editor. That way, you can trigger another object to rotate.
However, since what we want is to rotate the earth, there's no need to change your target object. Just pick the same one—the earth.
Next, you can also set the rotation degree. Let the earth rotate a little bit slower, so for the degree, we will add 270 degrees. But of course, you can set it however you'd like.
Moving on to the advanced settings! Here, you can set a few things first:
- Start Time: Determine the time your object starts to move after you click or tap on it.
- Duration: Determine how long your object will move.
- Easing: Specify the motion of your object, so at some points, it may accelerate or decelerate.
For Easing, you can choose among these 4 options:
- Linear: The object's motion will be static.
- In Sine: The object will rotate faster at the end of the motion.
- Out Sine: The object will rotate faster at the beginning of the motion.
- In Out Sine: The object will rotate slower in the beginning, fasten up in the middle, and get slower again at the end.
If you've set everything up, click Apply! Don't forget to take a quick preview—simply click on the Play button. 😉
Want to know how to operate the other interactions? Worry not—we've got everything up on our sleeve! Stay tuned on our blog and Learning Page and get ready to master them all. 🤩
In Assemblr, we believe that all people—including you—can create and present your own AR experiences. With an easy-to-use application, Assemblr empowers people to implement AR in any occasion. Interested to unveil more possibilities of AR? Download Assemblr now, available in App Store and Play Store!