<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — How to Rotate Drawings??]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=2009&amp;type=atom" />
	<updated>2022-08-04T10:20:55Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=2009</id>
		<entry>
			<title type="html"><![CDATA[Re: How to Rotate Drawings??]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8482#p8482" />
			<content type="html"><![CDATA[<p>There is no way to adjust the height here.<br />You can work around this by taking a drawing container or drawing instance and increasing transform.position.y.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2022-08-04T10:20:55Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8482#p8482</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to Rotate Drawings??]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8481#p8481" />
			<content type="html"><![CDATA[<p>Thanks! One more thing, is there any way to adjust the drawings height??</p><p>For now I am using the transform.position. But if there is a way to adjust the height via Onlinemaps, I&#039;ll be happy to listen!!</p><br /><p>*Update: it didn&#039;t change the angle of the drawing in any way. if i also use the </p><div class="codebox"><pre><code> var ang, var cos, var sin </code></pre></div><p> it will teleport outside the map and also became a line</p>]]></content>
			<author>
				<name><![CDATA[moonflow123]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1980</uri>
			</author>
			<updated>2022-08-04T01:31:26Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8481#p8481</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to Rotate Drawings??]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8480#p8480" />
			<content type="html"><![CDATA[<p>Hello.</p><div class="codebox"><pre><code>var heading = (step * i + someDegreeOffset) * OnlineMapsUtils.Deg2Rad;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2022-08-02T10:04:23Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8480#p8480</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[How to Rotate Drawings??]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8479#p8479" />
			<content type="html"><![CDATA[<p>Hi, I wanted to know if I can rotate my drawings. I have made an Ellipse and wanted to rotate it in any degree, is there any tools in OnlineMaps for that function??</p><p>For now I tried using this code but it didn&#039;t work as intended</p><div class="codebox"><pre><code>        for(int i = 0; i &lt; segments; i++)
        {
            var heading = (step * i) * OnlineMapsUtils.Deg2Rad;
            var px = (r * Math.Cos(heading)) + tx1;
            var py = (r / 2 * Math.Sin(heading)) + ty1;

            var ang = angle * OnlineMapsUtils.Deg2Rad;
            var cos = Math.Cos(ang);
            var sin = Math.Sin(ang);

            px = (px * cos) - (py * sin);
            py = (px * sin) + (py * cos);
            
            map.projection.TileToCoordinates(px, py, 20, out lng, out lat);
            points.Add(new Vector2((float)lng, (float)lat));
        }</code></pre></div>]]></content>
			<author>
				<name><![CDATA[moonflow123]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1980</uri>
			</author>
			<updated>2022-08-02T09:59:53Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8479#p8479</id>
		</entry>
</feed>
