<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Deactivate the markers outside the field of view ?]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1779&amp;type=atom" />
	<updated>2021-05-22T10:55:18Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=1779</id>
		<entry>
			<title type="html"><![CDATA[Re: Deactivate the markers outside the field of view ?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7482#p7482" />
			<content type="html"><![CDATA[<p>You need to iterate over all markers, and using Renderer.isVisible, check if it is visible and do the action that you need.<br /><a href="https://docs.unity3d.com/ScriptReference/Renderer-isVisible.html">https://docs.unity3d.com/ScriptReferenc … sible.html</a></p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2021-05-22T10:55:18Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7482#p7482</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Deactivate the markers outside the field of view ?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7481#p7481" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Alex Vertax wrote:</cite><blockquote><p>Hello.</p><p>You can try. Unity has an example of this.<br /><a href="https://docs.unity3d.com/ScriptReference/Renderer.OnBecameInvisible.html">https://docs.unity3d.com/ScriptReferenc … sible.html</a></p></blockquote></div><p>Thanks for the asnwer, but there was another question in my previous post :</p><p>Is there a way to know the number of markers which are in the camera field, to make an action (for instance recenter the camera) if no marker is visible ?<br />Best regards<br />Phil</p>]]></content>
			<author>
				<name><![CDATA[philzmz]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=606</uri>
			</author>
			<updated>2021-05-22T08:22:57Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7481#p7481</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Deactivate the markers outside the field of view ?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7478#p7478" />
			<content type="html"><![CDATA[<p>Hello.</p><p>You can try. Unity has an example of this.<br /><a href="https://docs.unity3d.com/ScriptReference/Renderer.OnBecameInvisible.html">https://docs.unity3d.com/ScriptReferenc … sible.html</a></p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2021-05-21T09:37:40Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7478#p7478</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Deactivate the markers outside the field of view ?]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=7476#p7476" />
			<content type="html"><![CDATA[<p>Imagine a map with for instance 400 markers all around the camera, each marker with a &quot;look at camera&quot; script, so it is&nbsp; always facing the camera. </p><p>If the camera FOV is 90°, only 1/4 of the markers (about one hundred) are displayed in the game view, but the 300 others, not in the field of view, continue to follow the camera position. Would it be interesting, in terms of performance, to deactivate the &quot;look at camera&quot; for the markers that are not displayed, and even the markers themselves ?</p><p>Is there a way to know the number of markers which are in the camera field, to make an action (for instance recenter the camera) if no marker is visible.</p><p>Best regards, Phil</p>]]></content>
			<author>
				<name><![CDATA[philzmz]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=606</uri>
			</author>
			<updated>2021-05-20T20:00:52Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=7476#p7476</id>
		</entry>
</feed>
