Select to view content in your preferred language

Screen to Geo translation going wrong

219
1
03-20-2026 09:02 AM
LukeMcBeath1
Emerging Contributor
I have a mobile app with its own UI and the a local arcgis map rendered underneath, the map can either follow the player or have a top down, north up view which allows panning and zooming.
 
I am passing pan commands to unity (see offset in the code below) and attempting to move the camera to the new location.
 
var worldPoint = cam.ScreenToWorldPoint(new Vector3((Screen.width / 2.0f) - offset.x(Screen.height / 2.0f) + offset.ycam.nearClipPlane));
var arcgisPoint = arcGISMapComponent.EngineToGeographic(worldPoint);
var location = ArcGISGeometryEngine.Project(arcgisPoint, ArcGISSpatialReference.WGS84());
if (location is ArcGISPoint locationPoint)
{
 
 // set cam location to locationPoint.X,locationPoint.Y
....
 
I think I am missing a step because when I drag across the full width of the screen I get a very small change in camera location.
 
Can anyone point me in the right direction?
 
Note follow the player and zooming is working.
0 Kudos
1 Reply
LukeMcBeath1
Emerging Contributor

Might have been some build/integration issue - code is working with only superficial changes

0 Kudos