<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Marker3d dragging problem with non zero map position + elevations]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=674&amp;type=atom" />
	<updated>2017-10-09T11:15:30Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=674</id>
		<entry>
			<title type="html"><![CDATA[Re: Marker3d dragging problem with non zero map position + elevations]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2905#p2905" />
			<content type="html"><![CDATA[<p>I see.<br />Fixed a description of the method in the documentation.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2017-10-09T11:15:30Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2905#p2905</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Marker3d dragging problem with non zero map position + elevations]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2902#p2902" />
			<content type="html"><![CDATA[<p>I&#039;m also manually setting marker altitude while dragging action is triggered:</p><div class="codebox"><pre><code>void Start()
{
    marker3d = GetComponent&lt;OnlineMapsMarker3DInstance&gt;().marker as OnlineMapsMarker3D;

    marker3d.SetDraggable();

    marker3d.OnDrag += (v) =&gt;
    {
         marker3d.altitude = CalculateAltitude();
    };
}

float CalculateAltitude()
{
    double tlx, tly, brx, bry;
    api.GetCorners( out tlx , out tly , out brx , out bry );
    var h = tscb.GetElevationValue( transform.position.x , transform.position.z , 1 , api.topLeftPosition , api.bottomRightPosition );
        return h;
}</code></pre></div><p>Solution for me is to use local position. Would you mention about relative (local) coordinates in the doc?</p>]]></content>
			<author>
				<name><![CDATA[leviniarened]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=557</uri>
			</author>
			<updated>2017-10-08T01:42:47Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2902#p2902</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Marker3d dragging problem with non zero map position + elevations]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2901#p2901" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Thanks for bug report, but I could not reproduce it.</p><p>Video:<br /><a href="https://www.dropbox.com/s/gxvucu52eplwd6f/2017-10-08%20-%200001.mp4?dl=0">https://www.dropbox.com/s/gxvucu52eplwd … 1.mp4?dl=0</a></p><p>I missed something?</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2017-10-07T23:44:44Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2901#p2901</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Marker3d dragging problem with non zero map position + elevations]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2900#p2900" />
			<content type="html"><![CDATA[<p>Hi,<br />I found an incorrect behaviour<br />How to reproduce:<br />Using map with enabled bing elevation.<br />Change map position to (1000, 0, 0). Go to place with big height difference (example lat: 46.0290180901501, lng: 11.0902961294749, zoom: 16))<br />Create marker3d, set allow drag and&nbsp; try to drag marker (marker flies).</p>]]></content>
			<author>
				<name><![CDATA[leviniarened]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=557</uri>
			</author>
			<updated>2017-10-07T15:14:07Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2900#p2900</id>
		</entry>
</feed>
