<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Map redraw on new floatZoom value;]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1158&amp;type=atom" />
	<updated>2019-05-12T16:28:12Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=1158</id>
		<entry>
			<title type="html"><![CDATA[Re: Map redraw on new floatZoom value;]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4928#p4928" />
			<content type="html"><![CDATA[<p>Right! Thank-you!</p>]]></content>
			<author>
				<name><![CDATA[danielesuppo]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=956</uri>
			</author>
			<updated>2019-05-12T16:28:12Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4928#p4928</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Map redraw on new floatZoom value;]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4927#p4927" />
			<content type="html"><![CDATA[<p>Hello.</p><p>When using Lerp, the result will tend to the target value, but will never be equal to it.<br />Add some threshold:<br /></p><div class="codebox"><pre><code>float newZoom = Mathf.Lerp (initZoom, 16, t);
if (16 - newZoom &lt; 0.01f) newZoom = 16;
map.floatZoom = newZoom;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2019-05-12T10:14:35Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4927#p4927</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Map redraw on new floatZoom value;]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=4924#p4924" />
			<content type="html"><![CDATA[<p>Hello, I&#039;d like to zoom the map a little when some gameobject is clicked.<br />To do so I&#039;m using this simple Lerp</p><p>OnlineMaps.instance.floatZoom = Mathf.Lerp(initZoom, 16, t);</p><p>The problem is that the map is zoomed, but is not updated to the new zoom level (16).</p><p>How can I update by script the map to zoom level 16?</p><p>Many thanks</p>]]></content>
			<author>
				<name><![CDATA[danielesuppo]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=956</uri>
			</author>
			<updated>2019-05-12T01:11:12Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=4924#p4924</id>
		</entry>
</feed>
