<?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 place 3d models in some areas]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=2153</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=2153&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in How to place 3d models in some areas.]]></description>
		<lastBuildDate>Thu, 31 Aug 2023 20:55:28 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: How to place 3d models in some areas]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9169#p9169</link>
			<description><![CDATA[<p>Unfortunately, I didn&#039;t understand your question.<br />Please rephrase it.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Thu, 31 Aug 2023 20:55:28 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9169#p9169</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to place 3d models in some areas]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9168#p9168</link>
			<description><![CDATA[<p>hello, I find that there is a question that I didn&#039;t find a way to get the vector tile of a specific tile using mapbox</p>]]></description>
			<author><![CDATA[null@example.com (skymulong)]]></author>
			<pubDate>Thu, 31 Aug 2023 14:56:37 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9168#p9168</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to place 3d models in some areas]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9160#p9160</link>
			<description><![CDATA[<p>Thanks.<br />Looking forward to your example.</p>]]></description>
			<author><![CDATA[null@example.com (skymulong)]]></author>
			<pubDate>Thu, 24 Aug 2023 02:23:05 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9160#p9160</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to place 3d models in some areas]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9154#p9154</link>
			<description><![CDATA[<p>I have an unfinished script that works with vector tiles (attached). <br />Hope this helps to understand how to download and read them.</p><p>Thanks for your question.<br />I saw that I didn&#039;t make some simple example of working with vector tiles, and I will try to add such an example in the next version of the asset.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 23 Aug 2023 10:41:34 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9154#p9154</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to place 3d models in some areas]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9153#p9153</link>
			<description><![CDATA[<p>I see your point. But I would like to ask is there any way to get the vector tiles of mapbox? Are there any examples or documentation I can look at?</p>]]></description>
			<author><![CDATA[null@example.com (skymulong)]]></author>
			<pubDate>Wed, 23 Aug 2023 02:42:22 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9153#p9153</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to place 3d models in some areas]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9143#p9143</link>
			<description><![CDATA[<p>Hello.</p><p>The best way depends on two things:<br />1. How many models you want to place.<br />2. Whether you know the coordinates of the polygon points of the areas.</p><p>If there are not too many models (up to 100-200), it is better to use 3D markers.<br />Examples of how to create a 3D marker can be found in the atlas of examples.<br /><a href="https://infinity-code.com/atlas/online-maps/index.html">https://infinity-code.com/atlas/online-maps/index.html</a><br />If you have a lot of models, it is better to make a pool of objects and position them on the map using OnlineMapsControlBaseDynamicMesh.GetWorldPosition.<br /><a href="https://infinity-code.com/doxygen/online-maps/classOnlineMapsControlBaseDynamicMesh.html#a72cf71ab8fdc9263d81e986316068362">https://infinity-code.com/doxygen/onlin … 6316068362</a></p><p>If you know the coordinates of the polygon points of the areas, good.<br />If you don&#039;t know them, you can find them using OSM Overpass API or get them from vector tiles.</p><p>When you have the point coordinates of the area polygons, you need to find a point within the polygon to place a marker or GameObject.<br />I would do it this way:<br />1. Find the bounding box for the polygon.<br />2. Got a random position inside the bounding box.<br />3. Using OnlineMapsUtils.IsPointInPolygon checked that the point is inside the polygon.<br /><a href="https://infinity-code.com/doxygen/online-maps/classOnlineMapsUtils.html#afdb08a4e15501fd93730fa85a199078b">https://infinity-code.com/doxygen/onlin … 85a199078b</a><br />4. If it is inside the polygon, create an object.<br />5. Repeat from step 2 the required number of times.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 16 Aug 2023 11:45:28 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9143#p9143</guid>
		</item>
		<item>
			<title><![CDATA[How to place 3d models in some areas]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9141#p9141</link>
			<description><![CDATA[<p>Can I place some 3D trees on the land? Or place some 3D fish models on the sea? They will randomly spread across these ranges. Can this be done? what should i do</p>]]></description>
			<author><![CDATA[null@example.com (skymulong)]]></author>
			<pubDate>Wed, 16 Aug 2023 10:05:30 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9141#p9141</guid>
		</item>
	</channel>
</rss>
