In/Out Rotation without full stop


I’m working on a fairly straightforward project, recreating the Universal Studios intro (logo around the earth) as an AR effect. In order to achieve this I’m looking to rotate my scene items in way that makes the text slow down slightly while in front of the camera and speed back up as it moves out of view, however I never want it to fully stop.

Scene object I’m rotating contains two sets of 3D letters.

My attempt so far has consisted in setting up a Tween script to handle the rotation, which I’ve setup as follows :

This gets me somewhat close to what I’m aiming to achieve however the rotation completely stops at every 90°. My idea was then to add another rotation script in a scene object above, that would take care of introducing a small linear movement. However when both these scripts are toggled, only one rotation is applied. I’ve taken care of renaming the tween etc, so don’t really understand what I’m doing wrong.
Order of items in the scene :

TL;DR : How do I get a sinusoidal style movement that would slow down the text as it’s in front of the camera so as to make it legible, without the text making a full stop? T^T

Almost get it
but still need to improve formula

//@input SceneObject obj
//@input float speed = 1.0 {"widget": "slider", "min": 0, "max": 10.0, "step": 0.01}
//@input float range = 10.0 {"widget": "slider", "min": 0, "max": 30.0, "step": 0.01}

    var newY = Math.sin(getTime() * script.speed) * script.range;
    var newRotation = new quat.fromEulerAngles(0, newY, 0);
1 Like

Thank you for the script @Jorik_Rosa !
Tried implementing it however it’s confronted to the same problem, I can’t stack the two rotations. As soon as I toggle both rotation scripts, only one is being applied. Even if said scripts are applied to different scene objects in the hierarchy :x

Might try to use your code base to do both movements in one though

I think the problem is that your rotation values are cancelling each other out. You have -90 every 15s and 180 every 30s. Adding those together will give you zero. If you reverse the direction of one of those, I bet you’ll see movement.