<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — [SOLVED] Anchor 3D object to the map.]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=2026&amp;type=atom" />
	<updated>2022-08-27T22:05:41Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=2026</id>
		<entry>
			<title type="html"><![CDATA[Re: [SOLVED] Anchor 3D object to the map.]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8550#p8550" />
			<content type="html"><![CDATA[<p>Hello Alex, thank you for your help!</p>]]></content>
			<author>
				<name><![CDATA[codemogen]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2164</uri>
			</author>
			<updated>2022-08-27T22:05:41Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8550#p8550</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [SOLVED] Anchor 3D object to the map.]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8549#p8549" />
			<content type="html"><![CDATA[<p>Yes, I summarize what I wrote above:<br /></p><div class="codebox"><pre><code>var marker3D = OnlineMapsMarker3DManager.CreateItem(borderPosition, borderPrefab); // Create 3D marker
marker3D.sizeType = SizeType.realWorld; // Set Size Type - Real World
marker3D.scale = SOMEVALUE; // Set a scale. You need to adjust this value.</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-27T11:59:56Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8549#p8549</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [SOLVED] Anchor 3D object to the map.]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8548#p8548" />
			<content type="html"><![CDATA[<p>But I can&#039;t give some static value because I try to explain that It has to change during the zoom change. For example If I set scale 600 It just save it as 600. I want to change the scale saving the aspect ratio during the zoom change. Is that possible?</p>]]></content>
			<author>
				<name><![CDATA[codemogen]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2164</uri>
			</author>
			<updated>2022-08-27T11:32:05Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8548#p8548</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [SOLVED] Anchor 3D object to the map.]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8547#p8547" />
			<content type="html"><![CDATA[<p>Why would you want to modify this?!<br />You need to specify marker3D.scale = SOMETHING in your script.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2022-08-27T11:14:32Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8547#p8547</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [SOLVED] Anchor 3D object to the map.]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8546#p8546" />
			<content type="html"><![CDATA[<p>In the marker have this component = &quot;OnlineMapsMarker3DInstance&quot;<br />And when I review the code inside this component ;<br />private void UpdateScale(OnlineMapsMarker3D marker3D)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; if (marker3D.sizeType == OnlineMapsMarker3D.SizeType.scene) transform.localScale = new Vector3(_scale, _scale, _scale);<br />&nbsp; &nbsp; &nbsp; &nbsp; else if (marker3D.sizeType == OnlineMapsMarker3D.SizeType.realWorld)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; float coof = (1 &lt;&lt; (OnlineMaps.MAXZOOM - _marker.manager.map.zoom)) * _marker.manager.map.zoomCoof;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; float s = _scale / coof;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; transform.localScale = new Vector3(s, s, s);<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; lastZoom = _marker.manager.map.floatZoom;<br />&nbsp; &nbsp; }</p><p>scale update process working here. But even if I modify it doesn&#039;t work. It keeps the same scale for the marker object during the zoom change. I want the increase or decrease the scale depending zoom value. Because border size goes up when zooming in and my object scale has to be increasing. I would appreciate it If we can fix this.</p>]]></content>
			<author>
				<name><![CDATA[codemogen]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2164</uri>
			</author>
			<updated>2022-08-27T11:07:26Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8546#p8546</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [SOLVED] Anchor 3D object to the map.]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8545#p8545" />
			<content type="html"><![CDATA[<p>You need to adjust the scale of the marker.<br /><a href="https://infinity-code.com/doxygen/online-maps/classOnlineMapsMarkerBase.html#a2756ad1e629f1e65638978c559bcf537">https://infinity-code.com/doxygen/onlin … c559bcf537</a></p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2022-08-27T10:55:22Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8545#p8545</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [SOLVED] Anchor 3D object to the map.]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8544#p8544" />
			<content type="html"><![CDATA[<p>Hello Alex, thank you for your attention. I also tried change the sizeType as realworld but it doesnt keep the actual scale of the prefab. It turns it to like very small value such as 0.058f. The 3d marker has OnlineMaps3DMarkerInstance component.</p>]]></content>
			<author>
				<name><![CDATA[codemogen]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2164</uri>
			</author>
			<updated>2022-08-26T22:34:44Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8544#p8544</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [SOLVED] Anchor 3D object to the map.]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8543#p8543" />
			<content type="html"><![CDATA[<p>The easiest way is to set Marker 3D Manager / Marker [N] / Size Type - Real World in the inspector.<br />If you&#039;re creating a marker using the API, use marker3D.sizeType = SizeType.realWorld.<br /><a href="https://infinity-code.com/doxygen/online-maps/classOnlineMapsMarker3D.html#ac8ee16a0d8bc771f2df37c88ac04bdca">https://infinity-code.com/doxygen/onlin … 88ac04bdca</a></p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2022-08-26T20:02:23Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8543#p8543</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [SOLVED] Anchor 3D object to the map.]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8542#p8542" />
			<content type="html"><![CDATA[<p>I just updated the topic. When I change the zoom I want to rescale the green borders object. It is the 3D marker. I use Marker_3DExample. When I zoom in to map It has to rescale as bigger. But it saves the scale. How can I modify it? (like stick it)</p>]]></content>
			<author>
				<name><![CDATA[codemogen]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2164</uri>
			</author>
			<updated>2022-08-26T10:25:30Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8542#p8542</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [SOLVED] Anchor 3D object to the map.]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8541#p8541" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Your post does not contain a picture, which looks like an important part of the question.<br />Please reattach this.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2022-08-26T09:16:21Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8541#p8541</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[[SOLVED] Anchor 3D object to the map.]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8539#p8539" />
			<content type="html"><![CDATA[<p>Hello. As can be seen from the picture I shared, I want to fix a 3D object to a specific region on the map in this way. The goal is to mark the borders. the size ratio needs to be maintained automatically when zooming in and out. Is this possible? How can I do that? I would be very glad if you could help.</p>]]></content>
			<author>
				<name><![CDATA[codemogen]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2164</uri>
			</author>
			<updated>2022-08-25T15:41:31Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8539#p8539</id>
		</entry>
</feed>
