<?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 — Manage height of 3D Marker]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=73</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=73&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Manage height of 3D Marker.]]></description>
		<lastBuildDate>Mon, 01 Feb 2016 17:19:16 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Manage height of 3D Marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=315#p315</link>
			<description><![CDATA[<p>Hello.</p><p>In «Start» it will always be zero, because Online Maps need to get data from Bing Maps Elevation API, and it takes time.<br />This script uses «LateUpdate» to prevent problems with the script execution order. <br />Theoretically it can be that this script executed earlier than control, and will be calculated elevation data for the previous frame.<br />To use it in «Update», set up «Edit / Project Settings / Script Execution Order».</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Mon, 01 Feb 2016 17:19:16 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=315#p315</guid>
		</item>
		<item>
			<title><![CDATA[Re: Manage height of 3D Marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=314#p314</link>
			<description><![CDATA[<p>Thank you it works great.<br />But is there a way to manage the elevation on Start and not on LateUpdate ?</p><p>When I put the code on late Update the elevation is set at each frame and it works.<br />But If I try to set the elevation juste once on Start it doesn&#039;t work (the elevation is set but it&#039;s automatically reset to 0 at each frame.</p><p>Thank you in advance</p>]]></description>
			<author><![CDATA[null@example.com (Pentos)]]></author>
			<pubDate>Mon, 01 Feb 2016 16:56:07 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=314#p314</guid>
		</item>
		<item>
			<title><![CDATA[Re: Manage height of 3D Marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=289#p289</link>
			<description><![CDATA[<p>The script and the screenshot attached.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Mon, 18 Jan 2016 16:31:13 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=289#p289</guid>
		</item>
		<item>
			<title><![CDATA[Re: Manage height of 3D Marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=288#p288</link>
			<description><![CDATA[<p>Use elevation is enabled.<br />Here is my code :</p><div class="codebox"><pre><code>Vector2 markerPosition = new Vector2(x,y);
marker3D = control.AddMarker3D(markerPosition, marker);
float originalScale = 1 &lt;&lt; defaultZoom;
float currentScale = 1 &lt;&lt; OnlineMaps.instance.zoom;
marker3D.scale = currentScale / originalScale;
Vector3 pos = marker3D.instance.transform.position;
Vector2 topLeftPosition = OnlineMaps.instance.topLeftPosition;
Vector2 bottomRightPosition = OnlineMaps.instance.bottomRightPosition;
pos.y = 8 * OnlineMapsTileSetControl.instance.GetBestElevationYScale(topLeftPosition, bottomRightPosition) * OnlineMapsTileSetControl.instance.elevationScale;
marker3D.instance.transform.position = pos;</code></pre></div><p>If I Debug.Log(pos) I get a non null value for pos.y but in the inspector the y value stay to 0.</p><p>Thanks again.</p>]]></description>
			<author><![CDATA[null@example.com (Pentos)]]></author>
			<pubDate>Mon, 18 Jan 2016 15:44:05 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=288#p288</guid>
		</item>
		<item>
			<title><![CDATA[Re: Manage height of 3D Marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=287#p287</link>
			<description><![CDATA[<p>First of all, make sure you use «Use Elevation - ON».<br />If the problem persists, please attach your script, I&#039;ll check it.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Mon, 18 Jan 2016 15:30:09 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=287#p287</guid>
		</item>
		<item>
			<title><![CDATA[Re: Manage height of 3D Marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=286#p286</link>
			<description><![CDATA[<p>Thank you for you answer.<br />I tried your example but my marker y position stay at 0.<br />Even if I tried to increase it manually in the inspector it always return to 0.</p>]]></description>
			<author><![CDATA[null@example.com (Pentos)]]></author>
			<pubDate>Mon, 18 Jan 2016 14:47:06 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=286#p286</guid>
		</item>
		<item>
			<title><![CDATA[Re: Manage height of 3D Marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=285#p285</link>
			<description><![CDATA[<p>Example:</p><div class="codebox"><pre><code>Vector3 pos = marker3D.instance.transform.position;
Vector2 topLeftPosition = OnlineMaps.instance.topLeftPosition;
Vector2 bottomRightPosition = OnlineMaps.instance.bottomRightPosition;
pos.y = markerAltitude * OnlineMapsTileSetControl.instance.GetBestElevationYScale(topLeftPosition, bottomRightPosition) * OnlineMapsTileSetControl.instance.elevationScale;
marker3D.instance.transform.position = pos;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Mon, 18 Jan 2016 11:59:35 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=285#p285</guid>
		</item>
		<item>
			<title><![CDATA[Re: Manage height of 3D Marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=284#p284</link>
			<description><![CDATA[<p>Yes i&#039;m asking about elevation of 3d marker.<br />To instantiate a 3d marker I use :</p><div class="codebox"><pre><code>Vector2 markerPosition = new Vector2(x,y);
marker3D = control.AddMarker3D(markerPosition, marker);</code></pre></div><p>So I use the couple latitude/longitude to instatiante the marker.<br />I would like to be able to also set the elevation.</p><p>Is OnlineMapsTileSetControl the right way?</p><p>Thank you.</p>]]></description>
			<author><![CDATA[null@example.com (Pentos)]]></author>
			<pubDate>Mon, 18 Jan 2016 11:48:09 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=284#p284</guid>
		</item>
		<item>
			<title><![CDATA[Re: Manage height of 3D Marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=283#p283</link>
			<description><![CDATA[<p>Hello.</p><p>You ask about the marker elevation, right?<br />There are many ways to do it.</p><p>OnlineMapsTileSetControl.GetElevationValue<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMapsTileSetControl.html#ade9262f27307f9c6417bcadca7e4a852">http://infinity-code.com/doxygen/online … dca7e4a852</a></p><p>OnlineMapsGetElevation.Find<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMapsGetElevation.html#ab554a14349595ce6d4502b1b2ee59c64">http://infinity-code.com/doxygen/online … 1b2ee59c64</a></p><p>One more way in «Aircraft.cs».</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Mon, 18 Jan 2016 10:35:44 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=283#p283</guid>
		</item>
		<item>
			<title><![CDATA[Manage height of 3D Marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=282#p282</link>
			<description><![CDATA[<p>Hello,</p><p>How can I manage the height of 3d marker? the poisition of the marker is only set by latitude and longitude.<br />Could you please indicate me the good way to manage the height. I wouldn&#039;t make bad modification on the 3d marker code.</p><p>Thanks you.</p>]]></description>
			<author><![CDATA[null@example.com (Pentos)]]></author>
			<pubDate>Mon, 18 Jan 2016 10:21:15 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=282#p282</guid>
		</item>
	</channel>
</rss>
