<?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 — Tileset HitTest error when camera outside frustum.]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=1907</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1907&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Tileset HitTest error when camera outside frustum..]]></description>
		<lastBuildDate>Wed, 26 Jan 2022 23:16:48 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Tileset HitTest error when camera outside frustum.]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8060#p8060</link>
			<description><![CDATA[<p>Please show the stack trace of next error.</p><p>Unfortunately, I don&#039;t know if you&#039;re doing the right thing or not.<br />For more or less simple cases, I can give advice on a short description of the problem.<br />But this is not your case.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 26 Jan 2022 23:16:48 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8060#p8060</guid>
		</item>
		<item>
			<title><![CDATA[Re: Tileset HitTest error when camera outside frustum.]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8056#p8056</link>
			<description><![CDATA[<p>Thanks Alex.&nbsp; That change definitely helped, but led to the next error.&nbsp; Maybe I&#039;m going about this incorrectly for what it is I&#039;m trying to accomplish.&nbsp; All I want to do is...</p><p>1.&nbsp; Have an AR Camera where all the user sees is the 3D markers (via map) within AR scene. I have this working using Tileset.</p><p>2.&nbsp; Have a slide-in map where the user can zoom, pan and rotate the Map.&nbsp; I have the slide-in map working using ortho camera (NOT Texture on UI/Canvas). What I am trying to do is add the ability for the user to zoom, pan, and rotate (cameraOrbit) while the Map is in view. </p><p>3.&nbsp; When map slides-back-out-of-view (user is back in AR world) the Tileset map/3D markers from step #1 are exactly as they were&nbsp; (before any changes were made by user zoom/pan/orbit).</p><p>To accomplish step #2 I added the Map Camera to the tileset map and give User Control and Zoom, plus added CameraOrbit component.&nbsp; By &quot;assigning&quot; the Map Camera to the tileset, I started receiving the frustum errors, which is why I created this post.&nbsp; </p><p>I spent a little time looking at the Tileset with Map Camera UI tutorial.<br />...and before I make a hot-mess of everything I thought I would check...<br />...just want to make sure I&#039;m doing things the write way; I tend to make things way too difficult.</p><p>Thanks.</p>]]></description>
			<author><![CDATA[null@example.com (digitalrock)]]></author>
			<pubDate>Wed, 26 Jan 2022 17:53:21 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8056#p8056</guid>
		</item>
		<item>
			<title><![CDATA[Re: Tileset HitTest error when camera outside frustum.]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8054#p8054</link>
			<description><![CDATA[<p>Hello.</p><p>Try this (OnlineMapsTileSetControl.HitTest):<br /></p><div class="codebox"><pre><code>protected override bool HitTest(Vector2 position)
{
#if NGUI
    if (UICamera.Raycast(position)) return false;
#endif
    Rect rect = activeCamera.rect;
    if (rect.width == 0 || rect.height == 0) return false;
    return cl.Raycast(activeCamera.ScreenPointToRay(position), out lastRaycastHit, OnlineMapsUtils.maxRaycastDistance);
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 26 Jan 2022 11:35:01 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8054#p8054</guid>
		</item>
		<item>
			<title><![CDATA[Tileset HitTest error when camera outside frustum.]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8053#p8053</link>
			<description><![CDATA[<p>Hi Alex,</p><p>I have a Map Camera which slides in from the side of the device.&nbsp; I use a Tileset control in my AR App, and map not visible to the AR camera via the culling.&nbsp; So while the Map Camera is out-of-view, I get the following errors:</p><p>Screen position out of view frustum (screen pos 0.000000, 0.000000) (Camera rect 0 0 0 1024)<br />UnityEngine.Camera:ScreenPointToRay (UnityEngine.Vector3)<br />OnlineMapsTileSetControl:HitTest </p><p>I&#039;m curious what is the best way to tackling having the map slide-in/out without getting the errors?&nbsp; My thought was to disable the map renderer, till the Display Map Button is clicked.&nbsp; Then, turn on renderer AND start camera slide into view.&nbsp; I do think there is a possibility of a few errors each time however, due to the renderer being enabled slightly before camera rect is updated.</p><p>What do you think?</p><p>EDIT: Maybe it would be better to switch between Main-Camera and Map camera (and back again) based on if the Display Map Button is clicked.</p><p>Thanks.</p>]]></description>
			<author><![CDATA[null@example.com (digitalrock)]]></author>
			<pubDate>Tue, 25 Jan 2022 20:43:38 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8053#p8053</guid>
		</item>
	</channel>
</rss>
