<?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 — User control stops working with the RealTilesetSizeExample script]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=909</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=909&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in User control stops working with the RealTilesetSizeExample script.]]></description>
		<lastBuildDate>Wed, 10 Oct 2018 12:17:42 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: User control stops working with the RealTilesetSizeExample script]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4023#p4023</link>
			<description><![CDATA[<p>I have solved it by settings Zoom (1-20) under Use Elevation to 1 - 20. It seems like it is generating a new mesh which has the same size as the real size tilemap. When use elevation was turned off, the mesh was smaller than the tileset so I lost user control as the mouse wasn&#039;t hovering over any mesh.</p>]]></description>
			<author><![CDATA[null@example.com (GingerBeard)]]></author>
			<pubDate>Wed, 10 Oct 2018 12:17:42 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4023#p4023</guid>
		</item>
		<item>
			<title><![CDATA[Re: User control stops working with the RealTilesetSizeExample script]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4018#p4018</link>
			<description><![CDATA[<p>It didn&#039;t work by increasing OnlineMapsUtils.maxRaycastDistance.</p><p>I&#039;ve worked around it by creating a new script calling this function when a button is clicked instead of using the example script.<br /></p><div class="codebox"><pre><code>public void SetRealSize() {
    // Get distance (km) between corners of map
    Vector2 distance = OnlineMapsUtils.DistanceBetweenPoints(OnlineMaps.instance.topLeftPosition,
        OnlineMaps.instance.bottomRightPosition);

    // Set tileset size
    OnlineMaps.instance.tilesetSize = distance * 1000;

    // Redraw map
    OnlineMaps.instance.Redraw();


    SetCenterPosition();
}</code></pre></div><br /><p>I attached a screenshot of the Online Maps component.</p><p>Edit: I still get some problems it seems like. Control is lost whenever zoom gets to 15 or 19 for some reason.</p><p>Just as a test I did this which stops all control at 15 or 19 zoom:<br /></p><div class="codebox"><pre><code>private void Update() {

        if(zoomValue != onlineMaps.zoom) {
            SetRealSize();
        }
        zoomValue = onlineMaps.zoom;
    }

    public void SetRealSize() {
        // Get distance (km) between corners of map
        Vector2 distance = OnlineMapsUtils.DistanceBetweenPoints(OnlineMaps.instance.topLeftPosition,
            OnlineMaps.instance.bottomRightPosition);

        // Set tileset size
        OnlineMaps.instance.tilesetSize = distance * 1000;

        // Redraw map
        OnlineMaps.instance.Redraw();


        SetCenterPosition();
}</code></pre></div><p>Edit 2: For some reason it works better with having Use Elevation set to true. I can go between 11 and 20 without the losing user control.</p><p>Edit 3: Updated to the latest version but I still have the same problem.</p>]]></description>
			<author><![CDATA[null@example.com (GingerBeard)]]></author>
			<pubDate>Tue, 09 Oct 2018 09:30:36 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4018#p4018</guid>
		</item>
		<item>
			<title><![CDATA[Re: User control stops working with the RealTilesetSizeExample script]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4009#p4009</link>
			<description><![CDATA[<p>Hello.</p><p>Most likely the problem is that the camera is very far from the map.<br />Try increasing OnlineMapsUtils.maxRaycastDistance.</p><p>If the problem persists, please send a screenshot of Online Maps component.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Sat, 06 Oct 2018 14:52:24 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4009#p4009</guid>
		</item>
		<item>
			<title><![CDATA[User control stops working with the RealTilesetSizeExample script]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=4007#p4007</link>
			<description><![CDATA[<p>Hi!</p><p>I have enabled Allow User Control on the OnlineMapsTileSetControl script and it works like expected, but when I add the RealTilesetSizeExample to the same GameObject all user control stops working. Does anyone else have the same problem and know how to fix this?</p>]]></description>
			<author><![CDATA[null@example.com (GingerBeard)]]></author>
			<pubDate>Fri, 05 Oct 2018 13:49:11 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=4007#p4007</guid>
		</item>
	</channel>
</rss>
