<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Best Camera Distance for Full Screen Map]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1997&amp;type=atom" />
	<updated>2022-07-04T17:32:36Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=1997</id>
		<entry>
			<title type="html"><![CDATA[Re: Best Camera Distance for Full Screen Map]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8430#p8430" />
			<content type="html"><![CDATA[<p>Hi Alex,</p><p>I used Camera Orbit with Lock Pan and Lock Tilt ON and removed my custom code. Thanks that worked! </p><p>We should mention that this scaling is intended for the default camera FOV of 60. Actually 65 also stays &quot;full screen&quot; in all resolutions. The FOV=99 I had in place before, leaves 30% of black borders around the map.</p>]]></content>
			<author>
				<name><![CDATA[heiwa-games]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2109</uri>
			</author>
			<updated>2022-07-04T17:32:36Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8430#p8430</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Best Camera Distance for Full Screen Map]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8429#p8429" />
			<content type="html"><![CDATA[<p>Hello.</p><p>The easiest way is to use Camera Orbit component.<br />If you don&#039;t need rotation, just set Lock Pan to ON, Lock Tilt to ON.</p><p>If you want to calculate it manually:<br /></p><div class="codebox"><pre><code>mapCameraDistance = screenHeight * 0.8f;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2022-07-03T20:55:40Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8429#p8429</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Best Camera Distance for Full Screen Map]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8428#p8428" />
			<content type="html"><![CDATA[<p>When using OnlineMapsTileSetControl on a RawImage that is layouted to full screen and using the AdjustToScreen component at least the TileSet.SizeInScene is automatically set. However how positioning the MapCamera is still to be done manually. I use the code</p><p>_MapCamera.transform.position = new Vector3(<br />&nbsp; &nbsp; _TileSet.sizeInScene.x / -2,<br />&nbsp; &nbsp; mapCameraDistance,<br />&nbsp; &nbsp; _TileSet.sizeInScene.y / 2 );</p><p>This centers the camera as desired but I don&#039;t have a way of calculating the Y value (distance of the camera over the RenderTexture) so that there is</p><p>a) no black area<br />b) the as few area as possibile overlaps the screen</p><p>Is there a method to get this distance?</p>]]></content>
			<author>
				<name><![CDATA[heiwa-games]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2109</uri>
			</author>
			<updated>2022-07-03T17:23:37Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8428#p8428</id>
		</entry>
</feed>
