- Home /
gyro attitude different w.r.t to app open
Hello,
I am getting really confused with gyroscope in Unity.
Environment: I set the game to be landscape Right. I use both IOS and ANDROID.
case 1: I switch on the APP with the phone held in portrait mode. The attitude is (0,0,0.7,0.7). I then rotate 90 degrees to be in landscape right mode, the attitude is now (0,0,0,1).
case 2: I switch on the APP with the phone held in landscape mode. The attitude is (0,0,0.7,0.7).
In both cases, I am ready to play the game but the Attitude is different!! Can someone explain how I can avoid this?
What I am trying to achieve is to read the rotation angle between the final attitude in the loading screen and its current attitude in one particular axis. like if one man puts a phone on his quats and does squats, to track the squat process. However, the user is required to stand straight during loading screen, the user can hold the phone in anydirection in the x-y plane.
PS: I noticed android and IOS also behave differently, but I'll leave if for another question.
Answer by glenwatkinson · Nov 11, 2020 at 08:30 AM
You're trying to detect whether or not somebody has done a squat by checking the angle change in the gyroscope while they hold the phone on their quadriceps? You also need to accommodate for the phone being held on the quadricep in either portrait or landscape mode (and the changing attitudes)?
I don't think any implementation you do is going to reliably determine whether or not somebody has done a proper squat. I think you should just store the attitude after the load screen, then if it changes at all in some time frame after the squat prompt, record a squat.
Your answer
Follow this Question
Related Questions
Rotate with raw gyro data. 0 Answers
3rd player orientation using gyro with offset 0 Answers
relative orientation to initial coordinate system,relative rotation coordinate transformation 0 Answers
Gyroscope rotation offset 1 Answer
Virtual Reality - Android Gyroscopic Camera - Pitch and Roll Issues. 1 Answer