Problem: I am trying to tween the hlookat and vlookat values to specific angles. My goal is to transition smoothly to a target view (70 degrees horizontal, 0 degrees vertical). However, when I implement the tween, the panorama rotates more than necessary, making a near-complete or complete rotation, which is not the desired effect.
What I’ve Tried: I used the normalizeView action to adjust the hlookat and vlookat values, aiming to normalize them within a 360-degree range. Here's the solution i see in this link moveto/lookto and zoomto together... ? from Amedee but its still not working
After normalization, I use the tween() function to move to the target view:
<action>
normalizeView(70,0);
tween(view.hlookat, 70, 1.0, easeInOutCubic);
tween(view.vlookat, 0, 1.0, easeInOutCubic);
</action>
Could there be an issue with how I'm normalizing the angles?
Is there a more effective way to ensure the tween only rotates the minimum amount necessary?
Thanks