Topic: v2.4.0.53 iOS Compass problem.
Hello.
Unity 4.7.1, iOS9, Xcode 7.3.1.
private void UpdateCompassFromInput(ref bool compassChanged)
{
float heading = Input.compass.trueHeading;
float offset = trueHeading - heading;
Debug.Log("heading : "+heading);
if (offset > 360) offset -= 360;
else if (offset < -360) offset += 360;
if (Mathf.Abs(offset) > compassThreshold)
{
compassChanged = true;
trueHeading = heading;
if (OnCompassChanged != null) OnCompassChanged(trueHeading / 360);
}
}
Input.compass.trueHeading is always 359.
So the compass does not work.
I agreed location services. When first installed.
In previous versions, I do not remember that run.
T.T Answer Please.
ADD ) Examples Scenes, It does not work