<?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 — Online Maps with GameObjects]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=1571</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1571&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Online Maps with GameObjects.]]></description>
		<lastBuildDate>Fri, 21 Aug 2020 10:46:01 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Online Maps with GameObjects]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=6607#p6607</link>
			<description><![CDATA[<p>It is a bad idea.<br />You will have a great loss of performance.</p><p>Why are you using marker3D.relativePosition?<br />This field contains the relative position on the map (XZ contains values 0-1, Y is always 0), not a position in the scene.</p><p>Also, you are not destroying the marker, and if you calling this code constantly, you will have a huge memory leak.<br />The correct way to destroy the marker is OnlineMapsMarker3DManager.RemoveItem.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Fri, 21 Aug 2020 10:46:01 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=6607#p6607</guid>
		</item>
		<item>
			<title><![CDATA[Re: Online Maps with GameObjects]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=6603#p6603</link>
			<description><![CDATA[<p>Y position was fine, I ended up just aligning it with the marker<br /></p><div class="codebox"><pre><code>// Marker position. Geographic coordinates.
Vector2 markerPosition = new Vector2((float)actor.actorLongitude, (float)actor.actorLatitude);
// Create 3D marker
marker3D = OnlineMapsMarker3DManager.CreateItem(markerPosition, instance.spawn[actor.actorIndex]);
// create new go at marker position
GameObject newActor = Instantiate(instance.spawn[actor.actorIndex], marker3D.relativePosition, marker3D.rotation);
newActor.transform.eulerAngles = new Vector3(actor.rotationX, actor.rotationY, actor.rotationZ);
// get rid of the marker
Destroy(marker3D.transform.gameObject);</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (mcb)]]></author>
			<pubDate>Thu, 20 Aug 2020 20:44:17 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=6603#p6603</guid>
		</item>
		<item>
			<title><![CDATA[Re: Online Maps with GameObjects]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=6590#p6590</link>
			<description><![CDATA[<p>Most likely, your model just has the wrong Y alignment.</p><p>How to fix it:<br />- Create a new empty GameObject.<br />- Place your model inside GameObject.<br />- Align your model so that y = 0 is at the bottom of the model.<br />- Create a prefab from an external GameObject, and use that for GetWorldPosition or markers.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Tue, 18 Aug 2020 20:00:56 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=6590#p6590</guid>
		</item>
		<item>
			<title><![CDATA[Re: Online Maps with GameObjects]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=6589#p6589</link>
			<description><![CDATA[<p>I see that a 3d marker solves that issue, but I would still like to know how to do it without refactoring.&nbsp; Seems like I&#039;m probably missing something very simple</p>]]></description>
			<author><![CDATA[null@example.com (mcb)]]></author>
			<pubDate>Tue, 18 Aug 2020 17:12:21 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=6589#p6589</guid>
		</item>
		<item>
			<title><![CDATA[Re: Online Maps with GameObjects]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=6588#p6588</link>
			<description><![CDATA[<p>Alex, I&#039;m using the OnlineMapsControlBaseDynamicMesh.instance.GetWorldPosition() to place my models as well, but the model comes in beneath the terrain.<br /> What is the recommended approach to push it up to the surface?&nbsp; I&#039;m at zoom level 15 if it matters, thanks!</p>]]></description>
			<author><![CDATA[null@example.com (mcb)]]></author>
			<pubDate>Tue, 18 Aug 2020 16:34:18 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=6588#p6588</guid>
		</item>
		<item>
			<title><![CDATA[Re: Online Maps with GameObjects]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=6497#p6497</link>
			<description><![CDATA[<p>Thanks a lot!</p>]]></description>
			<author><![CDATA[null@example.com (orkasan)]]></author>
			<pubDate>Wed, 22 Jul 2020 14:39:40 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=6497#p6497</guid>
		</item>
		<item>
			<title><![CDATA[Re: Online Maps with GameObjects]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=6496#p6496</link>
			<description><![CDATA[<p>OnlineMaps.InMapView<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMaps.html#a903338e51322b7e65aaf663637fbe9cd">http://infinity-code.com/doxygen/online … 3637fbe9cd</a></p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 22 Jul 2020 13:35:51 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=6496#p6496</guid>
		</item>
		<item>
			<title><![CDATA[Re: Online Maps with GameObjects]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=6495#p6495</link>
			<description><![CDATA[<p>I have another question. How to determine if the GameObject is inside/outside of the pan area?&nbsp; <br /></p><div class="quotebox"><cite>Alex Vertax wrote:</cite><blockquote><p>Hello.</p><p>Subscribe to OnlineMaps.OnChangePosition and OnlineMaps.OnChangeZoom.<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMaps.html#aa5d1ad65ba903de2b1c5ac37bdd7bfa1">http://infinity-code.com/doxygen/online … 37bdd7bfa1</a><br />When changing the position or zoom of the map, update the positions of your GameObjects using OnlineMapsControlBaseDynamicMesh.GetWorldPosition.</p></blockquote></div>]]></description>
			<author><![CDATA[null@example.com (orkasan)]]></author>
			<pubDate>Wed, 22 Jul 2020 12:44:46 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=6495#p6495</guid>
		</item>
		<item>
			<title><![CDATA[Re: Online Maps with GameObjects]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=6494#p6494</link>
			<description><![CDATA[<p>Thanks a lot, now it is solved. I was using lat-lon order..</p>]]></description>
			<author><![CDATA[null@example.com (orkasan)]]></author>
			<pubDate>Wed, 22 Jul 2020 11:58:26 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=6494#p6494</guid>
		</item>
		<item>
			<title><![CDATA[Re: Online Maps with GameObjects]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=6493#p6493</link>
			<description><![CDATA[<p>Your code looks fine.<br />There may be reasons:<br />1. You used coordinates that are far from the map view.<br />2. You used the wrong order of parameters in GetWorldPosition. First longitude, then latitude.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 22 Jul 2020 11:50:45 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=6493#p6493</guid>
		</item>
		<item>
			<title><![CDATA[Re: Online Maps with GameObjects]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=6492#p6492</link>
			<description><![CDATA[<p>Hi,</p><p>Thanks for the response. I tried the steps you have described however, GetWorldPosition returns quite huge coordinates. </p><p>Here is the code I test with:</p><div class="codebox"><pre><code>    void Start()
    {
        OnlineMaps.instance.OnChangePosition += UpdatePosition;
        OnlineMaps.instance.OnChangeZoom += UpdatePosition;
        UpdatePosition();
    }
    public void UpdatePosition()
    {
        this.gameObject.transform.position =OnlineMapsControlBaseDynamicMesh.instance.GetWorldPosition(55.674160, 12.573540);
    }</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (orkasan)]]></author>
			<pubDate>Wed, 22 Jul 2020 11:44:22 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=6492#p6492</guid>
		</item>
		<item>
			<title><![CDATA[Re: Online Maps with GameObjects]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=6491#p6491</link>
			<description><![CDATA[<p>Hello.</p><p>Subscribe to OnlineMaps.OnChangePosition and OnlineMaps.OnChangeZoom.<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMaps.html#aa5d1ad65ba903de2b1c5ac37bdd7bfa1">http://infinity-code.com/doxygen/online … 37bdd7bfa1</a><br />When changing the position or zoom of the map, update the positions of your GameObjects using OnlineMapsControlBaseDynamicMesh.GetWorldPosition.<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMapsControlBaseDynamicMesh.html#a72cf71ab8fdc9263d81e986316068362">http://infinity-code.com/doxygen/online … 6316068362</a></p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 22 Jul 2020 10:01:15 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=6491#p6491</guid>
		</item>
		<item>
			<title><![CDATA[Online Maps with GameObjects]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=6488#p6488</link>
			<description><![CDATA[<p>Hi,</p><p>I would like to add new moving GameObjects to specific coordinates on map, just like marker&#039;s mechanism but not marker. As I pan, I would like GameObjects move along with map also on zoom keep their coordinates, and if they are outside of the pan area they will be inactive. There might be 10000 GameObjects at the same time on whole map but only the ones within the pan area will be shown. </p><p>What would be the best way to achieve this goal?</p>]]></description>
			<author><![CDATA[null@example.com (orkasan)]]></author>
			<pubDate>Wed, 22 Jul 2020 08:03:30 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=6488#p6488</guid>
		</item>
	</channel>
</rss>
