<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic World position to unity position in ArcGIS Maps SDK for Unity Questions</title>
    <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/world-position-to-unity-position/m-p/1353910#M706</link>
    <description>&lt;P&gt;hello, everyone! I have some trouble with my scripts for Unity using.&lt;/P&gt;&lt;P&gt;I wrote a script to convert the latitude and longitude of ArcGIS Map into Unity world coordinates.&amp;nbsp;My code is as follows.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="e747362537_1-1701136162501.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/87266iFC31DF756C85F6DE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="e747362537_1-1701136162501.png" alt="e747362537_1-1701136162501.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But when I was debugging, the following message appeared in my console of Unity.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="e747362537_2-1701136242667.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/87267iA68AFDBB970B2ECD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="e747362537_2-1701136242667.png" alt="e747362537_2-1701136242667.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Latitude and longitude what my inputting are as follows.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="e747362537_3-1701136365051.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/87268iBC47DFD6A92C4E35/image-size/medium?v=v2&amp;amp;px=400" role="button" title="e747362537_3-1701136365051.png" alt="e747362537_3-1701136365051.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am troubled by the above problems, if someone has such a problem to solve the idea can give me a message?&lt;/P&gt;&lt;P&gt;Thanks for the help,&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Tung.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Nov 2023 01:57:04 GMT</pubDate>
    <dc:creator>e747362537</dc:creator>
    <dc:date>2023-11-28T01:57:04Z</dc:date>
    <item>
      <title>World position to unity position</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/world-position-to-unity-position/m-p/1353910#M706</link>
      <description>&lt;P&gt;hello, everyone! I have some trouble with my scripts for Unity using.&lt;/P&gt;&lt;P&gt;I wrote a script to convert the latitude and longitude of ArcGIS Map into Unity world coordinates.&amp;nbsp;My code is as follows.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="e747362537_1-1701136162501.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/87266iFC31DF756C85F6DE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="e747362537_1-1701136162501.png" alt="e747362537_1-1701136162501.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But when I was debugging, the following message appeared in my console of Unity.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="e747362537_2-1701136242667.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/87267iA68AFDBB970B2ECD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="e747362537_2-1701136242667.png" alt="e747362537_2-1701136242667.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Latitude and longitude what my inputting are as follows.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="e747362537_3-1701136365051.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/87268iBC47DFD6A92C4E35/image-size/medium?v=v2&amp;amp;px=400" role="button" title="e747362537_3-1701136365051.png" alt="e747362537_3-1701136365051.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am troubled by the above problems, if someone has such a problem to solve the idea can give me a message?&lt;/P&gt;&lt;P&gt;Thanks for the help,&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Tung.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 01:57:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/world-position-to-unity-position/m-p/1353910#M706</guid>
      <dc:creator>e747362537</dc:creator>
      <dc:date>2023-11-28T01:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: World position to unity position</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/world-position-to-unity-position/m-p/1354037#M709</link>
      <description>&lt;P&gt;ArcGISMapComponent globe = ...&lt;/P&gt;&lt;P&gt;var root = globe.gameObject.GetComponent&amp;lt;HPRoot&amp;gt;();&lt;BR /&gt;var view = globe.View;&lt;/P&gt;&lt;P&gt;double latitude = ...&lt;BR /&gt;double longitude = ...&lt;BR /&gt;double altitude = ...&lt;/P&gt;&lt;P&gt;ArcGISPoint geodLoc = new ArcGISPoint(longitude, latitude, altitude, ArcGISSpatialReference.WGS84())&lt;/P&gt;&lt;P&gt;double3 worldLoc = view.GeographicToWorld(geodLoc);&lt;/P&gt;&lt;P&gt;Vector3 universeLoc = (float3)root.TransformPoint(worldLoc);&lt;/P&gt;&lt;P&gt;The universeLoc is the position within the unity scene.&lt;/P&gt;&lt;P&gt;Be aware that the longitude is the first argument of&amp;nbsp;ArcGISPoint.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 14:18:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/world-position-to-unity-position/m-p/1354037#M709</guid>
      <dc:creator>FlorianGrabner</dc:creator>
      <dc:date>2023-11-28T14:18:13Z</dc:date>
    </item>
  </channel>
</rss>

