<?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 Re: Latitude and Longitude Coordinates converted to Unity World Position in ArcGIS Maps SDK for Unity Questions</title>
    <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/latitude-and-longitude-coordinates-converted-to/m-p/1287457#M527</link>
    <description>&lt;P&gt;double3 worldPosition = arcgismap.View.GeographicToWorld(ArcGISPointPosition);&lt;/P&gt;</description>
    <pubDate>Tue, 09 May 2023 20:49:11 GMT</pubDate>
    <dc:creator>Jade</dc:creator>
    <dc:date>2023-05-09T20:49:11Z</dc:date>
    <item>
      <title>Latitude and Longitude Coordinates converted to Unity World Position</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/latitude-and-longitude-coordinates-converted-to/m-p/1283558#M513</link>
      <description>&lt;P&gt;Hey there, I've been working with the Unity SDK for a bit, but I'm struggling in this one aspect.&lt;/P&gt;&lt;P&gt;Say I have a latitude and longitude, , how can I then convert those coordinates into Unity world coordinates? Ideally I'd want to do this without having to create a gameObject with an ArcGISLocationComponent.&lt;/P&gt;&lt;P&gt;I've seen a few functions around that seem close to what I want, but not quite. Unless I'm misunderstanding what some of these functions do, because the documentations/comments mix up terms like "geo, world, engine" that makes it confusing to figure out what exactly is being converted to what.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;    public static ArcGISPoint HitToGeoPosition(Vector3 point, float yOffset = 0)
    {
        double3 worldPosition = math.inverse(map.WorldMatrix).HomogeneousTransformPoint(point.ToDouble3());
        ArcGISPoint geoPosition = map.View.WorldToGeographic(worldPosition);
        ArcGISPoint offsetPosition = new ArcGISPoint(geoPosition.X, geoPosition.Y, geoPosition.Z + yOffset, geoPosition.SpatialReference);

        return GeoUtils.ProjectToSpatialReference(offsetPosition, new ArcGISSpatialReference(4326));
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 19:47:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/latitude-and-longitude-coordinates-converted-to/m-p/1283558#M513</guid>
      <dc:creator>TBraff</dc:creator>
      <dc:date>2023-04-27T19:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: Latitude and Longitude Coordinates converted to Unity World Position</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/latitude-and-longitude-coordinates-converted-to/m-p/1287457#M527</link>
      <description>&lt;P&gt;double3 worldPosition = arcgismap.View.GeographicToWorld(ArcGISPointPosition);&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 20:49:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/latitude-and-longitude-coordinates-converted-to/m-p/1287457#M527</guid>
      <dc:creator>Jade</dc:creator>
      <dc:date>2023-05-09T20:49:11Z</dc:date>
    </item>
  </channel>
</rss>

