I am trying to configure my code so that it works well on IPad in addition to desktop. I am working on creating custom controls based on Device input. When it comes to Touch, I am at a loss for how to create a custom controller for rotating the camera, especially since I am using a rotationQuaternion instead of rotation.
I created this playground to isolate the issue.
The relevant lines are 8, 124, and 128.
As you can see, if I use the rotationQuaternion and adjust it based on the deviceData.currentState vs deviceData.previousState difference, the camera rotates awkwardly and also hits a rotation limit at about 180 degrees either way.
Does anyone know how I can get around this?
Thanks in advance!