<?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 determine the 2d pixel size of a 3d marker]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=2044</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=2044&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How to determine the 2d pixel size of a 3d marker.]]></description>
		<lastBuildDate>Fri, 07 Oct 2022 09:17:55 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How to determine the 2d pixel size of a 3d marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8639#p8639</link>
			<description><![CDATA[<p>We used the renderer and it works like a charm!</p><p>Many thanks.</p>]]></description>
			<author><![CDATA[null@example.com (info@microteq.ch)]]></author>
			<pubDate>Fri, 07 Oct 2022 09:17:55 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8639#p8639</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to determine the 2d pixel size of a 3d marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8638#p8638</link>
			<description><![CDATA[<p>The best way is to hardcode it.<br />But if you really want to calculate the height dynamically, you can get Renderer of the marker instance, get the bounds from it, convert the corners to screen position, and calculate the height based on that.<br />Or instead of Renderer you can use Collider.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Thu, 06 Oct 2022 10:17:45 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8638#p8638</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to determine the 2d pixel size of a 3d marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8637#p8637</link>
			<description><![CDATA[<p>Ok, many thanks for your answer.</p><p>This is exactly what I have done, but then the marker goes first completely out of the top of the map, before the auto zoom occurs. On the bottom of the screen, it works well, because the marker&#039;s position is set to the bottom of the marker, so it is still visible, before it goes out of the screen and the auto focus occurs.</p><p>If you mean by &#039;add half the height&#039;, add half the height of the marker height, then this was exactly my question. How do I get the marker height in pixels to be able to calculate half of the height?</p><p>Many thanks</p>]]></description>
			<author><![CDATA[null@example.com (info@microteq.ch)]]></author>
			<pubDate>Thu, 06 Oct 2022 09:49:10 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8637#p8637</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to determine the 2d pixel size of a 3d marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8636#p8636</link>
			<description><![CDATA[<p>Hello.</p><p>You have many ways.<br />I would probably use OnlineMapsControlBase.GetScreenPosition to convert the marker coordinates to screen position, add half the height, and if Screen.width - screenPosition.y is less than some threshold, zoom out.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Thu, 06 Oct 2022 09:39:23 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8636#p8636</guid>
		</item>
		<item>
			<title><![CDATA[How to determine the 2d pixel size of a 3d marker]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8635#p8635</link>
			<description><![CDATA[<p>Hi</p><p>We want a 3d marker to be always visible in the map area and we use an auto zoom function for this. As the position of the marker is set at its bottom, we want to zoom out, when the top of the marker leaves the top of the map, and not when its position (bottom of marker) leaves the map.</p><p>For this, we need to determine the 2d pixel height of the marker (which ist always constant).</p><p>Does anyone know how to do this?</p><p>Many thans.</p>]]></description>
			<author><![CDATA[null@example.com (info@microteq.ch)]]></author>
			<pubDate>Thu, 06 Oct 2022 06:10:01 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8635#p8635</guid>
		</item>
	</channel>
</rss>
