Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geospatial Creator Anchors use Prefab location properties instead of scene overrides #171

Open
BR14Nx opened this issue Jan 18, 2024 · 2 comments
Assignees

Comments

@BR14Nx
Copy link

BR14Nx commented Jan 18, 2024

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.

@mrichards
Copy link

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 mrichards self-assigned this Jan 23, 2024
@BR14Nx
Copy link
Author

BR14Nx commented Jan 24, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants