1 (edited by mininox 2016-07-25 07:36:14)

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

Re: v2.4.0.53 iOS Compass problem.

Hello.

Online Maps Location Service is a wrapper for Unity Location Service and Unity Compass.
Try to test the compass directly:
http://docs.unity3d.com/ScriptReference … ading.html

I just tested all example scenes, it works.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.