<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Line drawing doesn't go through points]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=445&amp;type=atom" />
	<updated>2017-03-17T20:09:02Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=445</id>
		<entry>
			<title type="html"><![CDATA[Re: Line drawing doesn't go through points]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2043#p2043" />
			<content type="html"><![CDATA[<p>When the size is not 256 * N, the coordinate transformation methods does not work properly, and almost nothing is correctly positioned.<br />So currently use the right size.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2017-03-17T20:09:02Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2043#p2043</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Line drawing doesn't go through points]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2038#p2038" />
			<content type="html"><![CDATA[<p>Ah, I see. I was trying to map my own lines to the coordinate system in OnlineMaps, but couldn&#039;t figure out how to. I tried use GetWorldPosition, and then set the lines at that point, but that did not seem to work. Do you potentially know why?</p>]]></content>
			<author>
				<name><![CDATA[nbhandari]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=395</uri>
			</author>
			<updated>2017-03-17T13:22:27Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2038#p2038</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Line drawing doesn't go through points]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2021#p2021" />
			<content type="html"><![CDATA[<p>Hello.</p><p>We were able to reproduce the problem.<br />Yes, this is because the size is not 256 * N.<br />Thank you for reporting the problem.</p><p>We will try to fix it.<br />But this is perhaps the most deep and difficult problem that I ever seen (in Online Maps), and I do not know how long it will take.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2017-03-16T00:22:27Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2021#p2021</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Line drawing doesn't go through points]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2017#p2017" />
			<content type="html"><![CDATA[<p>Hi,</p><p>I tried playing around with width/height of map. It was set to 1920x1920. I tried setting it to 256x256 and it worked, so I thought it might be a resolution issue. Then I tried 512, then 1024, and they worked. I tried 1080, and it was wrong again. Then I tried 2048, and it was fine (albeit a bit slow). </p><p>It seems to only work when it&#039;s a power of 2. Is it because the tiling is set in powers of 2?</p>]]></content>
			<author>
				<name><![CDATA[nbhandari]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=395</uri>
			</author>
			<updated>2017-03-15T15:20:35Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2017#p2017</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Line drawing doesn't go through points]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1939#p1939" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Possible there is not enough accuracy with such a small line thickness.<br />Please show your Online Maps settings and GameObject Transform.<br />We will try to reproduce and fix the problem.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2017-03-08T11:27:34Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1939#p1939</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Line drawing doesn't go through points]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=1937#p1937" />
			<content type="html"><![CDATA[<p>We have a bunch of markers, and wish to draw lines connecting them. When using the Drawing API, none of the lines are passing through the marker points.</p><p>I&#039;ve had to scale my markers down to .005f, as in the HTC Vive, they come out huuuuuge otherwise. I&#039;m not sure if this would affect it, and they would otherwise be in the correct place? </p><p>I set the line weight to .001f, as again, it just covers the entire map otherwise. </p><p>My code&#039;s fairly simple:</p><p>foreach (double[] coord in geoms)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Vector2 pos = new Vector2((float)coord[0], (float)coord[1]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsMarker3D marker3D = control.AddMarker3D(pos,spawnPrefab);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; marker3D.scale = 0.005f;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //positions.Add(pos);<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; double[] positions = geoms.SelectMany(i =&gt; i).ToArray();<br />&nbsp; &nbsp; &nbsp; &nbsp; OnlineMapsDrawingLine line = new OnlineMapsDrawingLine(positions, Color.green, .001f);<br />&nbsp; &nbsp; &nbsp; &nbsp; OnlineMaps.instance.AddDrawingElement(line);</p><br /><p>Any idea?</p>]]></content>
			<author>
				<name><![CDATA[nbhandari]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=395</uri>
			</author>
			<updated>2017-03-07T14:22:31Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=1937#p1937</id>
		</entry>
</feed>
