<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Example: Simulation of movement marker on the route]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=95&amp;type=atom" />
	<updated>2016-02-26T20:02:52Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=95</id>
		<entry>
			<title type="html"><![CDATA[Re: Example: Simulation of movement marker on the route]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=401#p401" />
			<content type="html"><![CDATA[<p>Thanks! That&#039;s exactly what I was looking for. Happy to help!</p>]]></content>
			<author>
				<name><![CDATA[Quidam]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=76</uri>
			</author>
			<updated>2016-02-26T20:02:52Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=401#p401</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Example: Simulation of movement marker on the route]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=400#p400" />
			<content type="html"><![CDATA[<p>Something like:<br /></p><div class="codebox"><pre><code>marker3D.instance.transform.localRotation = Quaternion.Euler(0, 1.25f - OnlineMapsUtils.Angle2D((Vector2)p1, (Vector2)p2), 0);</code></pre></div><p>or<br /></p><div class="codebox"><pre><code>marker3D.rotation = Quaternion.Euler(0, 1.25f - OnlineMapsUtils.Angle2D((Vector2)p1, (Vector2)p2), 0);</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-02-26T19:29:52Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=400#p400</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Example: Simulation of movement marker on the route]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=399#p399" />
			<content type="html"><![CDATA[<p>Also, if I wanted to replace the 2D marker you use in the example with a 3D marker, it seems I need to handle this line:</p><p>marker.rotation = 1.25f - OnlineMapsUtils.Angle2D((Vector2)p2, (Vector2)points[pointIndex + 1]) / 360;</p><p>rather differently, as a 3D marker&#039;s rotation takes quaternions and the 2D one takes a float.</p>]]></content>
			<author>
				<name><![CDATA[Quidam]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=76</uri>
			</author>
			<updated>2016-02-26T19:17:25Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=399#p399</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Example: Simulation of movement marker on the route]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=398#p398" />
			<content type="html"><![CDATA[<p>Now I see the problem.<br />Just remove check (OnlineMaps.instance.target != OnlineMapsTarget.tileset).<br />Thank you very much for point out this bug.<br />We fixed this example.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-02-26T19:15:51Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=398#p398</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Example: Simulation of movement marker on the route]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=397#p397" />
			<content type="html"><![CDATA[<p>Just to be safe, I replaced the code I had in the example with what you&#039;ve got posted, even though I checked that line and it looked the same. I&#039;m still getting the same behavior. If I set &quot;Look to Marker&quot; to true, it updates fine. If I set &quot;Orient Marker...&quot; to true it updates jerkily- probably at each step. </p><p>I put a break line on the Redraw line you mentioned- and had actually done so before I read your reply as that&#039;s a likely suspect- but it never got called. If I replace this: (OnlineMaps.instance.target != OnlineMapsTarget.tileset) with (true) everything moves along just fine. Can you help me understand that clause, why it&#039;s needed, and why it might be failing in this case?</p><p>Also, is there anything obviously set improperly that you can see in the image I&#039;ve attached?</p><p>Thanks!</p>]]></content>
			<author>
				<name><![CDATA[Quidam]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=76</uri>
			</author>
			<updated>2016-02-26T18:38:56Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=397#p397</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Example: Simulation of movement marker on the route]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=393#p393" />
			<content type="html"><![CDATA[<p>Hello.</p><p>I tested this example on all types of map. It works well.<br />Perhaps you are using an older version of the script.<br />In Online Maps v2.3.0.1 this example has been updated (current version on the website or in Online Maps v2.3.0.1+).<br />Check that in line 131 called redrawing of map.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-02-24T21:09:30Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=393#p393</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Example: Simulation of movement marker on the route]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=392#p392" />
			<content type="html"><![CDATA[<p>In working with the following example I&#039;m encountering a behavior I&#039;m not sure is intended. The marker only seems to move along the route when the map is being updated, either by being dragged around or having the zoom changed. Do I need to move that code into a different Update call?</p><p>Thanks again!</p><br /><p><a href="http://infinity-code.com/atlas/online-maps/pages/MoveMarkerOnRouteExample.html">http://infinity-code.com/atlas/online-m … ample.html</a></p>]]></content>
			<author>
				<name><![CDATA[Quidam]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=76</uri>
			</author>
			<updated>2016-02-24T20:26:45Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=392#p392</id>
		</entry>
</feed>
