<?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 — Touch marker not run when the markers are close]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=918</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=918&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Touch marker not run when the markers are close.]]></description>
		<lastBuildDate>Wed, 24 Oct 2018 11:51:25 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Touch marker not run when the markers are close]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4093#p4093</link>
			<description><![CDATA[<p>Ok Thanks.<br />Finally, I use the Physics raycast to detect the marker and control the UI interface with the GraphicRaycaster to avoid the double interaction.</p>]]></description>
			<author><![CDATA[null@example.com (adri2111)]]></author>
			<pubDate>Wed, 24 Oct 2018 11:51:25 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4093#p4093</guid>
		</item>
		<item>
			<title><![CDATA[Re: Touch marker not run when the markers are close]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4089#p4089</link>
			<description><![CDATA[<p>I think that the manual OnClick invoke should be used at the last moment only if other ways do not help.</p><p>I recommend the following testing steps:<br />1. Make sure you don&#039;t have UI elements above the markers.<br />By default, it blocks map events and markers events.<br />The easiest way to make sure that the problem is not in UI is to use Online Maps / Troubleshooting / Not Interact Under GUI - OFF.<br />2. Make sure that RaycastHit (from the previous post) contain the correct GameObject.<br />3. Make sure that GameObject has OnlineMapsMarkerInstanceBase component.<br />4. Make sure that OnlineMapsMarkerInstanceBase.marker.OnClick != null.<br />5. Manually invoke OnClick by wrapping it in try / catch to make sure that it does not cause any exception.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 24 Oct 2018 08:48:41 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4089#p4089</guid>
		</item>
		<item>
			<title><![CDATA[Re: Touch marker not run when the markers are close]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4087#p4087</link>
			<description><![CDATA[<p>Thanks for your tip Alex!</p><p>I tryed it and I saw that the raycast works fine. But the onclick bind funcion doesn&#039;t run.</p><p>I&#039;m going to change the bind function to a manual raycast.</p><p>What do you think?</p><p>Thanks!</p>]]></description>
			<author><![CDATA[null@example.com (adri2111)]]></author>
			<pubDate>Wed, 24 Oct 2018 08:26:42 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4087#p4087</guid>
		</item>
		<item>
			<title><![CDATA[Re: Touch marker not run when the markers are close]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4081#p4081</link>
			<description><![CDATA[<p>Online Maps makes Raycast to markers, and checks if there is an OnlineMapsMarkerInstanceBase Component on the first hit.</p><p>Try making Raycast yourself to find out which collider triggered.<br />Something like:<br /></p><div class="codebox"><pre><code>RaycastHit hit;
if (Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition), out hit, OnlineMapsUtils.maxRaycastDistance))
{
    Debug.Log(hit.collider.gameObject.name);
}</code></pre></div><p>Perhaps some other collider overlaps the marker in your case.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Tue, 23 Oct 2018 13:55:39 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4081#p4081</guid>
		</item>
		<item>
			<title><![CDATA[Re: Touch marker not run when the markers are close]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4077#p4077</link>
			<description><![CDATA[<p>Yes, of course.</p><p>My App and the marker components has this look:<br /><span class="postimg"><img src="http://forum.infinity-code.com/misc.php?action=pun_attachment&amp;item=435&amp;download=0" alt="PunBB bbcode test" /></span></p><p>My code to bind event to marker is this:<br /></p><div class="codebox"><pre><code>public OnlineMapsMarker3D AddNewEgg(Egg egg,bool storage=true){
    GameObject prefabEgg =new GameObject();
    prefabEgg= GetEggPrefab(egg);
    OnlineMapsMarker3D marker = new OnlineMapsMarker3D();
 
    marker = onlineMapsTileComponent.AddMarker3D(egg.longitude, egg.latitude, prefabEgg);
    marker.scale = prefabEgg.transform.localScale.x;
    marker.transform.gameObject.GetComponent&lt;EggComponent&gt;().SetEgg(egg);
    if(storage==true){
        if(egg.typeEgg== Egg.TYPE_MANUAL_HW)
            GameSessionController.control.session.mapEggsManualList.Add(egg,marker);
        else
            GameSessionController.control.session.mapEggsRandomList.Add(egg,marker);
    }
    if(egg.opened==0)
        marker.OnClick += eggC;

    return marker;
}</code></pre></div><br /><p>And my situation is:<br />The click event runs very well with the all eggs on the Unity Editor.<br />But on Android build, only can click on the single eggs. The eggs that are very close to other can not execute the click event, for example the 3 eggs near to the character.<br />Can you give me some tips?</p><p>Thanks!!</p>]]></description>
			<author><![CDATA[null@example.com (adri2111)]]></author>
			<pubDate>Tue, 23 Oct 2018 11:31:45 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4077#p4077</guid>
		</item>
		<item>
			<title><![CDATA[Re: Touch marker not run when the markers are close]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4064#p4064</link>
			<description><![CDATA[<p>Hello.</p><p>I have never heard of such a problem.<br />Please send instructions on how to reproduce the problem.<br />I&#039;ll check it out and give you some advice on how to fix it.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Mon, 22 Oct 2018 16:46:32 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4064#p4064</guid>
		</item>
		<item>
			<title><![CDATA[Touch marker not run when the markers are close]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4061#p4061</link>
			<description><![CDATA[<p>Hi everyoune!</p><p>I have a problem with the click event in my Android App.<br />The marker clicks run well when they are far. But, when they are very close, It&#039;s impossible to execute the event.</p><p>it&#039;s only appear on the android App. On unity editor the click event run fine.</p><p>What can I do? Some idea?</p><p>Thanks!!!</p>]]></description>
			<author><![CDATA[null@example.com (adri2111)]]></author>
			<pubDate>Mon, 22 Oct 2018 10:52:49 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4061#p4061</guid>
		</item>
	</channel>
</rss>
