- Home /
Question by
youngapprentice · Apr 15, 2020 at 06:49 PM ·
iosaccelerometergyroscopeunity remotecompass
iOS Compass over Unity Remote 5
Hi, all!
I'm noticing that when running Unity Remote 5 over iOS, the compass passes the initialization and then reports 0 continuously at all times. Is there a way I can get heading data over unity remote 5?
Init code:
IEnumerator Start()
{
Debug.Log("Attempting to start location services");
Input.location.Start();
Input.compass.enabled = true;
Debug.Log("Attempting countdown");
int maxWait = 20;
while(Input.location.status == LocationServiceStatus.Initializing && maxWait > 0) {
yield return new WaitForSeconds(1);
Debug.Log(maxWait);
maxWait --;
} if( maxWait < 1) {
Debug.Log("Timed out");
} if (Input.location.status == LocationServiceStatus.Failed) {
Debug.Log("Unable to determine location");
}
Debug.Log("Looks good!");
}
And then in Update() I'm just printing Input.compass.trueHeading, which is always 0
I would really appreciate some help on this. It took me about 30 hours to even figure out that this was the issue.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612231518im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
gyroscope or accelrometer?? 1 Answer
Sensor Fusion of Accelerometer and Gyroscope 0 Answers
iOS accelometer functionality as gyroscope 1 Answer
Android Gyro explanation? 2 Answers
How do I access CoreMotion and the Android equivalent? 0 Answers