Select to view content in your preferred language

ArcGISView missing SpatialReference - Trying to convert from Lat/Lon to Unity space coordinates

344
0
10-27-2023 10:59 AM
JacobDunbar
New Contributor

Hello! I'm currently attempting to convert a coordinate position (ArcGISPoint or Lat/Lon) to Unity engine coordinates in my local map scene. The suggestion is to use ArcGISView.GeographicToWorld(ArcGISPoint) to get a world position ("worldPos") and then use HPRoot.TransformPoint(worldPos) to get the corresponding Unity transform value, but I only get NaN values from GeographicToWorld because the view is supposedly missing a spatial reference.

How do I overcome this? The documentation has nothing about why the view would be missing a spatial reference so I have no clue how to fix this. Is there a way to assign a spatial reference? Or just another way to calculate the Unity position entirely?

For reference this is the post I've been trying to work off of: https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/world-position-to-unity-position-f...

0 Kudos
0 Replies