<?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 — Drag 3D Marker]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=1300</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1300&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Drag 3D Marker.]]></description>
		<lastBuildDate>Fri, 19 Jul 2019 11:26:00 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Drag 3D Marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5339#p5339</link>
			<description><![CDATA[<p>If you want the marker to be optional draggable, you need to implement it yourself.<br /></p><div class="codebox"><pre><code>marker.OnPress += OnMarkerPress;

private void OnMarkerPress(OnlineMapsMarkerBase marker)
{
    if (condition) OnlineMapsControlBase.instance.dragMarker = this;
}</code></pre></div><p>P.S. Using this way, you do not need to use SetDraggable.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Fri, 19 Jul 2019 11:26:00 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5339#p5339</guid>
		</item>
		<item>
			<title><![CDATA[Re: Drag 3D Marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5337#p5337</link>
			<description><![CDATA[<div class="quotebox"><cite>Alex Vertax wrote:</cite><blockquote><p>Actually the problem is in your prefab.<br />1. UI element cannot be 3D marker.<br />2. SpriteRenderer does not need to be UI element.<br />3. When using SpriteRenderer, you need to manually add and configure BoxCollider.</p><p>I made a video of how to create a SpriteRenderer marker:<br /><a href="https://www.dropbox.com/s/m67ltm1868pjlk1/Online%20Maps%20-%20SpriteRenderer%20Marker.mp4?dl=0">https://www.dropbox.com/s/m67ltm1868pjl … r.mp4?dl=0</a></p></blockquote></div><p>Thanks for your video.<br />Managed to get it working. One last question, once we set the marker to be draggable, how do I turn it off?</p>]]></description>
			<author><![CDATA[null@example.com (spinball)]]></author>
			<pubDate>Fri, 19 Jul 2019 00:23:22 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5337#p5337</guid>
		</item>
		<item>
			<title><![CDATA[Re: Drag 3D Marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5333#p5333</link>
			<description><![CDATA[<p>Actually the problem is in your prefab.<br />1. UI element cannot be 3D marker.<br />2. SpriteRenderer does not need to be UI element.<br />3. When using SpriteRenderer, you need to manually add and configure BoxCollider.</p><p>I made a video of how to create a SpriteRenderer marker:<br /><a href="https://www.dropbox.com/s/m67ltm1868pjlk1/Online%20Maps%20-%20SpriteRenderer%20Marker.mp4?dl=0">https://www.dropbox.com/s/m67ltm1868pjl … r.mp4?dl=0</a></p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Thu, 18 Jul 2019 12:18:59 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5333#p5333</guid>
		</item>
		<item>
			<title><![CDATA[Re: Drag 3D Marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5329#p5329</link>
			<description><![CDATA[<div class="quotebox"><cite>Alex Vertax wrote:</cite><blockquote><p>I have not seen your code, and it is difficult for me to say what is wrong.</p><p>I created a simple test script and it works correctly.<br /></p><div class="codebox"><pre><code>using UnityEngine;

public class TestDrag3DMarker : MonoBehaviour
{
    private void Start()
    {
        double lng, lat;
        OnlineMaps.instance.GetPosition(out lng, out lat);
        OnlineMapsMarker3D marker3D = OnlineMapsMarker3DManager.CreateItem(lng, lat, null);
        marker3D.scale = 50;
        marker3D.SetDraggable();
    }
}</code></pre></div></blockquote></div><p>Not sure if there is something wrong with my prefab... User will select and assign texture to the sprite renderer at runtime...</p>]]></description>
			<author><![CDATA[null@example.com (spinball)]]></author>
			<pubDate>Thu, 18 Jul 2019 02:10:56 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5329#p5329</guid>
		</item>
		<item>
			<title><![CDATA[Re: Drag 3D Marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5328#p5328</link>
			<description><![CDATA[<p>I have not seen your code, and it is difficult for me to say what is wrong.</p><p>I created a simple test script and it works correctly.<br /></p><div class="codebox"><pre><code>using UnityEngine;

public class TestDrag3DMarker : MonoBehaviour
{
    private void Start()
    {
        double lng, lat;
        OnlineMaps.instance.GetPosition(out lng, out lat);
        OnlineMapsMarker3D marker3D = OnlineMapsMarker3DManager.CreateItem(lng, lat, null);
        marker3D.scale = 50;
        marker3D.SetDraggable();
    }
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Thu, 18 Jul 2019 00:20:38 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5328#p5328</guid>
		</item>
		<item>
			<title><![CDATA[Re: Drag 3D Marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5327#p5327</link>
			<description><![CDATA[<div class="quotebox"><cite>Alex Vertax wrote:</cite><blockquote><p>Hello.</p><p>Yes.<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMapsMarkerBase.html#ad12e52711e22ee13d8c2f2bba1a6a5f6">http://infinity-code.com/doxygen/online … bba1a6a5f6</a></p></blockquote></div><p>Thanks for replying.</p><p>I tried with 2D marker and I&#039;m able to do a long press and drag, however, I&#039;m not able to press and hold and drag the 3D marker.<br />I created a prefab and added it on my map. I set the marker to SetDraggable and subscribed to OnLongPress and OnDrag events. Kind of using the same method as your example. Are there more stuffs that I need to do?</p>]]></description>
			<author><![CDATA[null@example.com (spinball)]]></author>
			<pubDate>Thu, 18 Jul 2019 00:13:41 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5327#p5327</guid>
		</item>
		<item>
			<title><![CDATA[Re: Drag 3D Marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5318#p5318</link>
			<description><![CDATA[<p>Hello.</p><p>Yes.<br /><a href="http://infinity-code.com/doxygen/online-maps/classOnlineMapsMarkerBase.html#ad12e52711e22ee13d8c2f2bba1a6a5f6">http://infinity-code.com/doxygen/online … bba1a6a5f6</a></p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 17 Jul 2019 10:18:31 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5318#p5318</guid>
		</item>
		<item>
			<title><![CDATA[Drag 3D Marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5317#p5317</link>
			<description><![CDATA[<p>Hi,</p><p>Can I drag a 3D Marker?</p><p>Thanks!</p>]]></description>
			<author><![CDATA[null@example.com (spinball)]]></author>
			<pubDate>Wed, 17 Jul 2019 06:08:26 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5317#p5317</guid>
		</item>
	</channel>
</rss>
