arcore-unity-extensions icon indicating copy to clipboard operation
arcore-unity-extensions copied to clipboard

Geospatial Creator Anchors use Prefab location properties instead of scene overrides

Open BR14Nx opened this issue 1 year ago • 2 comments
trafficstars

Reproduction:
Make a Prefab with a Geospatial Creator Origin and Geospatial Creator Anchor. Move the anchor to position A.
Insert the Prefab into a scene and change the position of the Geospatial Creator Origin and Anchor to position B.

Result:
The Anchor is set to the Prefab position A and not as expected position B.

What is expected:
The Anchor should be set to the scene override values at position B.

BR14Nx avatar Jan 18 '24 23:01 BR14Nx

Hi @BR14Nx, are you changing the position in the Unity Editor or via the Geospatial Creator C# API? If scripting, are you changing the lat/lon/alt or the Unity x/y/z coordinates?

If you are scripting, when the Unity coordinates are modified, the lat/lon/alt will not be immediately to match. This happens in the next Update() call, though I'm not sure if that is what you're describing or not.

mrichards avatar Jan 23 '24 17:01 mrichards

Hi @BR14Nx, are you changing the position in the Unity Editor or via the Geospatial Creator C# API? If scripting, are you changing the lat/lon/alt or the Unity x/y/z coordinates?

If you are scripting, when the Unity coordinates are modified, the lat/lon/alt will not be immediately to match. This happens in the next Update() call, though I'm not sure if that is what you're describing or not.

I am using the Geospatial Creator Anchor and Origin components. I am not changing anything via own scripts. I only set the lat/lon/height of the origin component, not the gameobject. Though I do change the Anchor GameObject directly with the Transform, not the lat/lon/height, since this is the intended way. And I also noticed that the lat/lon/height of the Anchor components is not always correctly updated either, when I change the Origins coordinates in the Editor. Sometimes it shows the updated Anchor coordinates, sometimes it doesn't. But when I launch the application, it always uses the Prefabs coordinates, not the scene overrides. And it stays like that, even after the first Update() is called.

BR14Nx avatar Jan 24 '24 13:01 BR14Nx