<?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 — Marker get events with Collider on Children]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=1388</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1388&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Marker get events with Collider on Children.]]></description>
		<lastBuildDate>Thu, 31 Oct 2019 17:53:52 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Marker get events with Collider on Children]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5720#p5720</link>
			<description><![CDATA[<p>This way it will look for the collider, if it could not found in the same object, it will then look on parent.<br />It&#039;s even possible to modify to get to the marker root. if necessary.</p>]]></description>
			<author><![CDATA[null@example.com (mrfigueiredo)]]></author>
			<pubDate>Thu, 31 Oct 2019 17:53:52 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5720#p5720</guid>
		</item>
		<item>
			<title><![CDATA[Re: Marker get events with Collider on Children]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5719#p5719</link>
			<description><![CDATA[<p>I take a look to the class you mentioned. <br />I found out that the OnlineMapsControlBase3D get the function.<br />And i could get just a small chance that work for every situation.</p><p>So if you are interested follow the code modification to get it working;</p><p>if (Physics.Raycast(activeCamera.ScreenPointToRay(screenPosition), out hit, OnlineMapsUtils.maxRaycastDistance))<br />&nbsp; &nbsp; &nbsp; &nbsp; {</p><br /><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsMarkerInstanceBase markerInstance = null;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; markerInstance = markerInstance ?? hit.collider.gameObject.GetComponent&lt;OnlineMapsMarkerInstanceBase&gt;();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; markerInstance = markerInstance ?? hit.collider.gameObject.GetComponentInParent&lt;OnlineMapsMarkerInstanceBase&gt;();<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (markerInstance != null)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return markerInstance.marker;<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p>]]></description>
			<author><![CDATA[null@example.com (mrfigueiredo)]]></author>
			<pubDate>Thu, 31 Oct 2019 17:52:36 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5719#p5719</guid>
		</item>
		<item>
			<title><![CDATA[Re: Marker get events with Collider on Children]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5718#p5718</link>
			<description><![CDATA[<p>Hello.</p><p>Theoretically, it is possible.<br />You need to create your own Control that inherits OnlineMapsTileSetControl class, and rewrite GetInteractiveElement method to get OnlineMapsMarkerInstanceBase from the parent GameObjects.</p><p>Practically - in most cases it’s easier and better do not use marker events.<br />Instead, implement custom events on GameObjects that have colliders.<br />To get a marker from the internal collider, use GetComponentInParent&lt;OnlineMapsMarkerInstanceBase&gt;().marker.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Thu, 31 Oct 2019 17:34:13 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5718#p5718</guid>
		</item>
		<item>
			<title><![CDATA[Marker get events with Collider on Children]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5716#p5716</link>
			<description><![CDATA[<p>The project i am working on, uses markers with a lot of children, and most are mesh, so is necessary tu use mesh colliders.<br />But they are very variable, like lines and such. <br />Is there a way to make the press events work on children colliders?? Until now, all i get to work is with colliders on the root of the marker.</p>]]></description>
			<author><![CDATA[null@example.com (mrfigueiredo)]]></author>
			<pubDate>Thu, 31 Oct 2019 16:52:09 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5716#p5716</guid>
		</item>
	</channel>
</rss>
