<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Infinity Code Forum — Update multiple positions on maps]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=1157</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1157&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Update multiple positions on maps.]]></description>
		<lastBuildDate>Sun, 12 May 2019 10:07:39 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Update multiple positions on maps]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4926#p4926</link>
			<description><![CDATA[<p>Hello.</p><p>Theoretically, you can greatly optimize calculations in this way:<br />1. Calculate the coordinates of the borders of your GameObject (find the top-left coordinate and bottom-right coordinate).<br />2. When OnChangeZoom and OnChangePosition, find the tile position and unity world position of your corners.<br />3. Convert the coordinates of each GameObject to a tile position, find the relative tile position of the GameObject and, based on this, find the unity world position of GameObject.<br />4. If the GameObject is inside the map view, get elevation.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Sun, 12 May 2019 10:07:39 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4926#p4926</guid>
		</item>
		<item>
			<title><![CDATA[Update multiple positions on maps]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4923#p4923</link>
			<description><![CDATA[<p>Hello,<br />I have hundreds of childGameobjects placed on my map.<br />All of them are parented to a rootGameobject.</p><p>The root.position is (0,0,0), the root.localScale is (1,1,1),<br />and I initialize them with &quot;GetWorldPositionWithElevation&quot;, because I know their real longitude/latitude.</p><p>When I pan or zoom the map I&#039;d like their positions to be updated, but if I call &quot;GetWorldPositionWithElevation&quot; for each of them on &quot;OnChangeZoom&quot; and &quot;OnChangePosition&quot; events&nbsp; I have a huge performance issue.</p><p>I can translate my rootGameobject on the basis of the map translation (OnlineMaps.position), but the translation combined with the map zoom is giving to me a lot of struggles.</p><p>Is there a &quot;right&quot; way&nbsp; to update the position of all my gameobjetcs in one go, on the basis of map translation and map zoom, in reference to a root transform?</p><p>Many thanks!</p>]]></description>
			<author><![CDATA[null@example.com (danielesuppo)]]></author>
			<pubDate>Sat, 11 May 2019 20:40:59 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4923#p4923</guid>
		</item>
	</channel>
</rss>
