Hi there,
so here is my situation.
I export a GLTF Scene from Blende, this has some nodes where my camera is suppoed to move.
So naturally the nodes are exported with position and rotation.
Now I habe my scene camera in Three and move it with TweenJs like that:
new TWEEN.Tween(camera.rotation)
.to({y:scene.target_camera.rotation.y,x:scene.target_camera.rotation.x,z:scene.target_camera.rotation.z}, duration)
.start()
It Kinda Works, for some of the Position. But for others it performs annyoing axis jumps.
As I understand, and want, it the tween always tales the shortest route.
However, When I go from 0° to 47° … it works like a charm.
Now when I go from the 47° to 112° it flips weirdly and takes the loung route.
So I know of course, that the system works with radians instead of degree and that all of that is converted by export. When I convert Dregree_to_Radians on the values I do not get the correct degrees I have set in Blender.
The Node that is supposed to have a 112° in Blender, now has a somewhat 68° something degree in Three …
What is the solution to that problem and what causes it?
I have indeed found hacky workaround and I am not satisfied.
So it works like that:
In Blender I have a script that exports the gltf and it takes the Degree values and stores it in a custom property.
Now in Threejs I can read that property and I Tween a custom attribute of the camera, instead of its rotation and than set the rotation from that custom attribute.
It works… but it is not excact. It is jiggly and wiggly and ugly… So it is not THE Solution…
Any Ideas, what I am on to here?