Howdy!
I'm creating a manual calibration system for our application, the idea being that the user can manually match a unity scene to the real world by setting the floor level, moving horizontally in a direction, and rotating the world. I will create an automatic system using plane detection later.
Ideally, I should be able to stand in a room with a table, and if that same table's dimensions is in the unity scene, I should be able to match it up perfectly.
What I need is a click and drag rotation, if I press the trigger and move my arm to the right 100 degrees, I want my world to rotate by the same 100 degrees.
To do this, I have implemented a controller input where if I squeeze the trigger, I am reading the controller's rotation value and setting the rotation of the XRRig gameObject to the difference between the moment it started being pressed, to when it ends. I am not getting the full 360 degree range of motion I need, it seems that when I rotate the controller to a certain amount in one direction, the rotation begins to switch directions even when the controller is still moving in its original direction.
I think this is because the rotation value is between 0 and 360, and then once I cross over that edge from 360 back to 0, it switches direction (I know it's a quaternion I'm just simplifying for explanation).
Is there a better way to get the desired rotation I want while maintaining accuracy? Is there another game object besides the XRRig I can use as my rotating gameObject?
Unity Editor version: 2022.3.5f1
ML2 OS version: 1.4.0-dev2 (secure)
MLSDK version: v1.3.0
Host OS: Windows