Hello everyone,
I have a SniperRifle as GameObject with a sprite as symbol which has a ArcGisLocation.
See inspector:
I want to update the Arcgis Location to the position of my mouse when I press Q.
I wrote this source Code but it doesn't work:
So when I press Q the gameObject (sniper Rifle) is away.
I would like to get the Arcgis-Location of my mouse when I press Q and set it to my gameObject.
I am very happy if you help me.
Solved! Go to Solution.
var worldPosition = math.inverse(arcGISMapComponent.WorldMatrix).HomogeneousTransformPoint(posMouse.ToDouble3());
var geoPosition = arcGISMapComponent.View.WorldToGeographic(worldPosition);
sniperRifle.GetComponent<ArcGISLocationComponent>().Position = geoPosition;
var worldPosition = math.inverse(arcGISMapComponent.WorldMatrix).HomogeneousTransformPoint(posMouse.ToDouble3());
var geoPosition = arcGISMapComponent.View.WorldToGeographic(worldPosition);
sniperRifle.GetComponent<ArcGISLocationComponent>().Position = geoPosition;
Great,
thank you very much 👍