<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Map shake a little with SetPosition]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1161&amp;type=atom" />
	<updated>2019-05-15T22:03:52Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=1161</id>
		<entry>
			<title type="html"><![CDATA[Re: Map shake a little with SetPosition]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4947#p4947" />
			<content type="html"><![CDATA[<p>It work perfectly. Thank-you!</p>]]></content>
			<author>
				<name><![CDATA[danielesuppo]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=956</uri>
			</author>
			<updated>2019-05-15T22:03:52Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4947#p4947</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Map shake a little with SetPosition]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4944#p4944" />
			<content type="html"><![CDATA[<p>Many thanks, I&#039;ll try as you suggested</p>]]></content>
			<author>
				<name><![CDATA[danielesuppo]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=956</uri>
			</author>
			<updated>2019-05-15T14:37:23Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4944#p4944</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Map shake a little with SetPosition]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4941#p4941" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Here are two problems:<br />1. Vector2 is based on float, and it just doesn&#039;t have enough accuracy on a large zoom.<br />Use doubles or OnlineMapsVector2d instead of Vector2.<br />OnlineMapsVector2d also has a Lerp method.<br />2. Use Lerp for coordinates is not correct, because the coordinates exist on the sphere, and the map is displayed on the plane (has a Mercator projection).<br />For a larger zoom you probably will not see this problem.<br />But for small zoom it will be very noticeable.<br />The correct way is Lerp tile position.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2019-05-15T12:50:40Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4941#p4941</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Map shake a little with SetPosition]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4939#p4939" />
			<content type="html"><![CDATA[<p>Hello, I&#039;m moving the map very slowly from a longitude latitude point to another,<br />with a simple Lerp:</p><p>Vector2 newMapPos = Vector2.Lerp(pos1,pos2, t);<br />double longitude = newMapPos.x;<br />double latitude = newMapPos.y;<br />OnlineMaps.instance.SetPosition(longitude, latitude);</p><p>The map is very zoomed, and I can see that it &quot;shake&quot; a little.<br />Obviously with a lower zoom is much less noticeable.</p><p>Am I doing something wrong or it is normal?<br />Many thanks</p>]]></content>
			<author>
				<name><![CDATA[danielesuppo]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=956</uri>
			</author>
			<updated>2019-05-15T11:04:24Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4939#p4939</id>
		</entry>
</feed>
