Hi, I want to begin by saying thank you Apple for making the Spatial framework! Please add a million more features ;-)
I'm using the following code to make an object "look at" another point, but at a particular rotation the object "flips" its rotations.
See a video here: https://www.dropbox.com/s/5irxt0gxou4c2j6/QuaternionFlip.mov?dl=0
I shake the mouse cursor when it happens to make it obvious to you.
import Spatial
let lookAtRotation = Rotation3D(eye: Point3D(position), target: Point3D(x: 0, y: 0, z: 0), up: Vector3D(x: 0, y: 1, z: 0))
myObj.quaternion = lookAtRotation.quaternion
So my question is why is this happening, and how can I fix it?
thx