<?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 — 3D markers problem]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=289</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=289&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in 3D markers problem.]]></description>
		<lastBuildDate>Mon, 26 Sep 2016 11:25:32 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: 3D markers problem]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1319#p1319</link>
			<description><![CDATA[<p>Thanks a lot, it worked. Thanks for the quick answer.</p>]]></description>
			<author><![CDATA[null@example.com (nykos)]]></author>
			<pubDate>Mon, 26 Sep 2016 11:25:32 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1319#p1319</guid>
		</item>
		<item>
			<title><![CDATA[Re: 3D markers problem]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1318#p1318</link>
			<description><![CDATA[<p>Hello.</p><p>The second script. You confused the latitude and longitude. It should be:<br /></p><div class="codebox"><pre><code>locationBunkerMarker = control.AddMarker3D(new Vector2((float)DataSaver.bunkerLong, (float)DataSaver.bunkerLat), bunkerMarkerPrefab);</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Mon, 26 Sep 2016 10:10:11 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1318#p1318</guid>
		</item>
		<item>
			<title><![CDATA[3D markers problem]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1317#p1317</link>
			<description><![CDATA[<p>Hi, my name is Nicolas. I bought your package a week ago and it&#039;s one of the best i&#039;ve bought. Thank you for the work you&#039;ve done on it.</p><p>I&#039;m managing to do all i want with it but i have a weird think happening. I am using a tileset map and i&#039;m trying to spawn 3D markers when the scene is loaded. It&#039;s working great for some of them, but not for others. If it is of any help, for now i am working on pc, not on mobile yet.</p><p>At first i spawn the player&#039;s marker, works great, it gets spawned at the coorfinates i want, moves with the map when i drag the map with the mouse, perfect.<br />Then i spawn a base/HQ for the player, gets instantiated at the right coordinates, but gets disabled right from start.&nbsp; when i enable it manualy, it doesn&#039;t move when the map is dragged. And when i don&#039;t do it manualy, it only gets enabled when zooming is at 3 or 4.<br />Finaly i spawn my enemies markers using a list, and just the player, everything works perfectly.</p><p>here are the functions i am using:</p><div class="codebox"><pre><code>    public void SpawnPlayer()
    {
        OnlineMapsControlBase3D control = map.GetComponent&lt;OnlineMapsControlBase3D&gt;();
        if (control == null)
        {
            Debug.LogError(&quot;You must use the 3D control (Texture or Tileset).&quot;);
            return;
        }
        else if (control != null)
        {
            locationPlayerMarker = control.AddMarker3D(DataSaver.lastSavedGPSPos, playerMarkerPrefab);
            playerComp = locationPlayerMarker.instance.GetComponent&lt;PlayerMarker&gt;();
            playerComp.attackButton = attackButton;
            playerComp.killText = killText;

            // Subscribe to change zoom.
            OnlineMaps.instance.OnChangeZoom += OnChangeZoom;

            // Initial rescale marker.
            OnChangeZoom();


        }</code></pre></div><p>and</p><div class="codebox"><pre><code>public void SpawnBunker()
    {
        OnlineMapsControlBase3D control = map.GetComponent&lt;OnlineMapsControlBase3D&gt;();
        if (control == null)
        {
            Debug.LogError(&quot;You must use the 3D control (Texture or Tilset).&quot;);
            return;
        }
        else if (control != null)
        {
            locationBunkerMarker = control.AddMarker3D(new Vector2((float)DataSaver.bunkerLat, (float)DataSaver.bunkerLong), bunkerMarkerPrefab);
            OnlineMaps.instance.OnChangeZoom += OnChangeBunkerZoom;

            OnChangeBunkerZoom();
        }
    }
}</code></pre></div><p>Is there anything i forgot to do?</p>]]></description>
			<author><![CDATA[null@example.com (nykos)]]></author>
			<pubDate>Mon, 26 Sep 2016 09:45:37 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1317#p1317</guid>
		</item>
	</channel>
</rss>
