<?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 — How to visualize quads (tileset map case)?]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=561</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=561&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How to visualize quads (tileset map case)?.]]></description>
		<lastBuildDate>Wed, 31 May 2017 13:26:08 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How to visualize quads (tileset map case)?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=2434#p2434</link>
			<description><![CDATA[<p>Actually nevermind, the optimal solution seems to calculate all 4 corners and create lines via mesh with clamped scale</p>]]></description>
			<author><![CDATA[null@example.com (SweetTooth)]]></author>
			<pubDate>Wed, 31 May 2017 13:26:08 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=2434#p2434</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to visualize quads (tileset map case)?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=2433#p2433</link>
			<description><![CDATA[<p>Actually the problem is caused by scale calculation - I use logic from the DrawCircleWithRadius example:</p><p>&nbsp; &nbsp; &nbsp; &nbsp; OnlineMaps api = OnlineMaps.instance;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; Vector2 distance = OnlineMapsUtils.DistanceBetweenPoints(api.topLeftPosition, api.bottomRightPosition);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; float scaleX = diameterInKM / distance.x * api.tilesetSize.x;<br />&nbsp; &nbsp; &nbsp; &nbsp; float scaleY = diameterInKM / distance.y * api.tilesetSize.y;<br />&nbsp; &nbsp; &nbsp; &nbsp; float scale = (scaleX + scaleY) / 2;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; circle.transform.localScale = new Vector3(scale, sizeY, scale);</p><p>and if I try to clamp it on zoom level 17+, it solves the issue, however this makes quad visualization incorrect... What should I do?</p>]]></description>
			<author><![CDATA[null@example.com (SweetTooth)]]></author>
			<pubDate>Wed, 31 May 2017 12:37:56 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=2433#p2433</guid>
		</item>
		<item>
			<title><![CDATA[How to visualize quads (tileset map case)?]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=2431#p2431</link>
			<description><![CDATA[<p>Hello</p><p>Can you please tell me, how can I visualize quads on the map via simple cube meshes?</p><p>I tried the following algorythm:</p><p>1. converted current quad to tile coordinates<br />2. subtracted Vector2(0.5f, 0.5f) from it to get tile center (not sure about y, maybe it should be inverted)<br />3. converted tile center coordinates to geographic coordinates<br />4. used the OnlineMapsTileSetControl.instance.GetWorldPosition() method to get the position and calculated scale</p><p>It works, but looks awful, because when map is being dragged, the calculated world position always differs and it makes the mesh which shows quad bounds to constantly reposition... Is it possible to mitigate this effect somehow?</p><p>Please help...</p>]]></description>
			<author><![CDATA[null@example.com (SweetTooth)]]></author>
			<pubDate>Wed, 31 May 2017 12:13:21 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=2431#p2431</guid>
		</item>
	</channel>
</rss>
