<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — How to place 3d models in some areas]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=2153&amp;type=atom" />
	<updated>2023-08-31T20:55:28Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=2153</id>
		<entry>
			<title type="html"><![CDATA[Re: How to place 3d models in some areas]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9169#p9169" />
			<content type="html"><![CDATA[<p>Unfortunately, I didn&#039;t understand your question.<br />Please rephrase it.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2023-08-31T20:55:28Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9169#p9169</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to place 3d models in some areas]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9168#p9168" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[skymulong]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2659</uri>
			</author>
			<updated>2023-08-31T14:56:37Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9168#p9168</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to place 3d models in some areas]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9160#p9160" />
			<content type="html"><![CDATA[<p>Thanks.<br />Looking forward to your example.</p>]]></content>
			<author>
				<name><![CDATA[skymulong]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2659</uri>
			</author>
			<updated>2023-08-24T02:23:05Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9160#p9160</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to place 3d models in some areas]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9154#p9154" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2023-08-23T10:41:34Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9154#p9154</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to place 3d models in some areas]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9153#p9153" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[skymulong]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2659</uri>
			</author>
			<updated>2023-08-23T02:42:22Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9153#p9153</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: How to place 3d models in some areas]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9143#p9143" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2023-08-16T11:45:28Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9143#p9143</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[How to place 3d models in some areas]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9141#p9141" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[skymulong]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2659</uri>
			</author>
			<updated>2023-08-16T10:05:30Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9141#p9141</id>
		</entry>
</feed>
