<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — v2.4.0.53  iOS Compass problem.]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=202&amp;type=atom" />
	<updated>2016-07-25T08:02:49Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=202</id>
		<entry>
			<title type="html"><![CDATA[Re: v2.4.0.53  iOS Compass problem.]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=913#p913" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Online Maps Location Service is a wrapper for Unity Location Service and Unity Compass.<br />Try to test the compass directly:<br /><a href="http://docs.unity3d.com/ScriptReference/Compass-trueHeading.html">http://docs.unity3d.com/ScriptReference … ading.html</a></p><p>I just tested all example scenes, it works.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-07-25T08:02:49Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=913#p913</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[v2.4.0.53  iOS Compass problem.]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=910#p910" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Unity 4.7.1, iOS9, Xcode 7.3.1.</p><p>&nbsp; &nbsp; private void UpdateCompassFromInput(ref bool compassChanged)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; float heading = Input.compass.trueHeading;<br />&nbsp; &nbsp; &nbsp; &nbsp; float offset = trueHeading - heading;<br />&nbsp; &nbsp; &nbsp; &nbsp; Debug.Log(&quot;heading : &quot;+heading);&nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; if (offset &gt; 360) offset -= 360;<br />&nbsp; &nbsp; &nbsp; &nbsp; else if (offset &lt; -360) offset += 360;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; if (Mathf.Abs(offset) &gt; compassThreshold)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; compassChanged = true;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; trueHeading = heading;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (OnCompassChanged != null) OnCompassChanged(trueHeading / 360);<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; }</p><p>Input.compass.trueHeading is always 359.</p><p>So the compass does not work.</p><p>I agreed location services. When first installed.</p><p>In previous versions, I do not remember that run.</p><p>T.T Answer Please.</p><p>ADD ) Examples Scenes, It does not work</p>]]></content>
			<author>
				<name><![CDATA[mininox]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=187</uri>
			</author>
			<updated>2016-07-25T07:08:20Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=910#p910</id>
		</entry>
</feed>
