<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — 3D markers problem]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=289&amp;type=atom" />
	<updated>2016-09-26T11:25:32Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=289</id>
		<entry>
			<title type="html"><![CDATA[Re: 3D markers problem]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1319#p1319" />
			<content type="html"><![CDATA[<p>Thanks a lot, it worked. Thanks for the quick answer.</p>]]></content>
			<author>
				<name><![CDATA[nykos]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=263</uri>
			</author>
			<updated>2016-09-26T11:25:32Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1319#p1319</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: 3D markers problem]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1318#p1318" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-09-26T10:10:11Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1318#p1318</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[3D markers problem]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1317#p1317" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[nykos]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=263</uri>
			</author>
			<updated>2016-09-26T09:45:37Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1317#p1317</id>
		</entry>
</feed>
