Open qwertyempire opened 6 years ago
You can change axes and signs in the following function: https://github.com/Looking-Glass/JoyconLib/blob/master/Assets/JoyconLib_scripts/Joycon.cs#L460
Hi,
I have been trying to change axes and signs in the ProcessIMU method, but got no results. I assume I have to change j_b and k_b axis in the first_imu_packet condition then change the way they are incremented. Am I wrong? If so what should I do instead?
Thanks!
Hi, After some fiddling with the demo script, I ended up with this
orientation = j.GetVector();
orientation = new Quaternion(orientation.x, orientation.z, orientation.y, orientation.w);
gameObject.transform.localRotation = Quaternion.Inverse(orientation);
and either rotate it 180 degrees on the y axis or put it under a rotated game object in the hierarchy, and it'll switch the axis.
Hi, After some fiddling with the demo script, I ended up with this
orientation = j.GetVector(); orientation = new Quaternion(orientation.x, orientation.z, orientation.y, orientation.w); gameObject.transform.localRotation = Quaternion.Inverse(orientation);
and either rotate it 180 degrees on the y axis or put it under a rotated game object in the hierarchy, and it'll switch the axis.
Where do I put this code? This is probably dead though
gameObject.transform.rotation = orientation; gameObject.transform.Rotate(90,0,0,Space.World); //Add this line will fix the problem
Hello,
When I turn the JoyCon, the y and z rotations seem to be switched, is there a way to fix this?
Thanks!