<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Questions about the anchor location of downloaded terrain]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=2096&amp;type=atom" />
	<updated>2023-03-24T13:59:46Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=2096</id>
		<entry>
			<title type="html"><![CDATA[Re: Questions about the anchor location of downloaded terrain]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8927#p8927" />
			<content type="html"><![CDATA[<p>1. In that case you need to iterate over all the terrains you have loaded. <br />Get the RealWorldTerrainItem component from them. <br />Use Contains method to find an item that contains a coordinate, and use GetWorldPosition of that item.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2023-03-24T13:59:46Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8927#p8927</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Questions about the anchor location of downloaded terrain]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8925#p8925" />
			<content type="html"><![CDATA[<p>1. Real World Terrain Items components from the generated terrains are not missing. I just made the terrains downloaded from RWT into&nbsp; offline assetbundles. In this way, I can only load a few pieces of terrain at a time, which can achieve offline dynamic loading, and can also update the terrain offline. I don&#039;t know if this is the reason for the error, so what should I do? Is it that the built-in coordinate conversion algorithm I can&#039;t use anymore?</p><p>2.2. I did not set a parent object, and the way to download it was the same for both times. I downloaded it several times, but the corners were still in the center.</p><p>3.My idea is that RWT can use the texture of Onlinemaps.</p>]]></content>
			<author>
				<name><![CDATA[XiaWuchu]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1032</uri>
			</author>
			<updated>2023-03-24T01:30:23Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8925#p8925</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Questions about the anchor location of downloaded terrain]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8923#p8923" />
			<content type="html"><![CDATA[<p>1. This could happen in two ways:<br />a. When you have deleted several generated terrains. <br />This can be corrected by switching the Inspector to debug mode, and from Real World Terrain Container / Terrains removing all Missing elements.<br />b. You deleted all or part of Real World Terrain Items components from the generated terrains. <br />Unfortunately, there is no way to add them back. It simply will not work. <br />You will need to generate terrains again.</p><p>2. No idea. RWT always generates a container aligned to the same corner.<br />Most likely you manually created a parent for the terrain.<br />Fixing this is very easy:<br />- Create an empty GameObject child for terrain.<br />- Set its position to (0, 0, 0).<br />- Move this object to the root of the scene.<br />- Place the terrain inside this object.</p><p>3. Unfortunately, I don&#039;t understand the question.<br />If you mean to use Online Maps tiles to generate terrains using RWT, this is not possible.<br />If you mean to use a texture generated by RWT in Online Maps, then it is possible. If you need I can give you an example how to do this.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2023-03-23T18:17:56Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8923#p8923</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Questions about the anchor location of downloaded terrain]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8919#p8919" />
			<content type="html"><![CDATA[<p>1.I conducted coordinate conversion according to the method you mentioned. But there have been some problems here, and I don&#039;t know how to eliminate them. I used the following statement to perform coordinate conversion. Please check the attached image for the error code.</p><p>“RealWorldTerrainContainer.GetInstances()[0].GetWorldPosition(FlgtDataSet.Instance._dUAVLon, FlgtDataSet.Instance._dUAVLat, FlgtDataSet.Instance._fUAVAlt, out v3Temp);”</p><p>2. Questions about the anchor location of downloaded terrain.<br />I first downloaded a large range of terrain using RWT, and then downloaded a small high-precision terrain.<br />However, the anchor point of the former is in the lower left corner, but the latter is in the center.<br />This caused me some trouble with coordinate conversion.<br />How does this need to be set? Why is there such a difference between the two?<br />I didn&#039;t actually make any special settings. Generally speaking, where is the anchor point for the downloaded terrain? I have attached the anchor location images of the terrain I downloaded twice. Please check them.</p><p>3. Do you mean that the downloaded offline satellite images in onlinemaps cannot be used for the terrain downloaded by RWT? Must I use the satellite image texture automatically downloaded by RWT to attach to the elevation?</p><p>Thank you for your help. I feel like I&#039;m not far from success.</p>]]></content>
			<author>
				<name><![CDATA[XiaWuchu]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1032</uri>
			</author>
			<updated>2023-03-23T08:18:36Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8919#p8919</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Questions about the anchor location of downloaded terrain]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8918#p8918" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Please tell me more about your problem with coordinate conversion.</p><p>No, RWT uses a publicly available conversion algorithm from Google.<br />See RealWorldTerrainUtils.LatLongToTile.</p><p>Please attach your generation settings and object coordinates, I will check it.</p><p>Maybe the problem is in your conversion method.<br />Try using RWT API (RealWorldTerrain.RealWorldTerrainMonoBase.GetWorldPosition) .<br /><a href="http://infinity-code.com/doxygen/real-world-terrain/classInfinityCode_1_1RealWorldTerrain_1_1RealWorldTerrainMonoBase.html#afb3910d85df0f087bc9bb82c7eeca5b6">http://infinity-code.com/doxygen/real-w … 2c7eeca5b6</a></p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2023-03-22T20:47:15Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8918#p8918</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Questions about the anchor location of downloaded terrain]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=8917#p8917" />
			<content type="html"><![CDATA[<p>Hello, Alex! </p><p>I have encountered another problem. <br />I first downloaded a large range of terrain using RWT, and then downloaded a small high-precision terrain. <br />However, the anchor point of the former is in the lower left corner, but the latter is in the center. <br />This caused me some trouble with coordinate conversion. <br />How does this need to be set? Why is there such a difference between the two?</p><p>In addition, does our plug-in have its own coordinate conversion method about conversion of unity coordinates and true longitude and latitude coordinates? <br />I added a target on onlineMaps, and then transferred the corresponding position of longitude and latitude in the three-dimensional terrain to generate the target. But I found a significant positional difference between the two. I use my own method to convert, and I feel there is a certain error. I downloaded Google&#039;s satellite maps, while I used Mapbox for RWT. <br />I don&#039;t know if my conversion method is not very accurate or if the two map sources are different.&nbsp; Can I directly apply the downloaded offline satellite images from onlinemaps to the RWT Terrain? HAHA~ Can you give me some suggestions? Be deeply grateful!</p><p>By the way, these two plug-ins work well together. They help me a lot, you too.</p>]]></content>
			<author>
				<name><![CDATA[XiaWuchu]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=1032</uri>
			</author>
			<updated>2023-03-22T12:26:10Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=8917#p8917</id>
		</entry>
</feed>
