Scaling and latitude/longitude issue

Hi everyone!

We are currently developing a VR application with the Cesium plugin for Unreal Engine (UE 5.3.2). The basic idea is to switch between a miniature map on a table and a map with a 1:1 scale (similar to Scaling and georeferencing?). We have separate levels for both modes right now and switch to the 1:1 level by placing an actor with a global anchor on the map table.

However, we have issues with the actor’s latitude and longitude. We currently scale the miniature map using a CesiumGeoreference with a scale of 0.14. If we use a scale of 100, we get the correct real-world coordinates at the actor’s location (i.e., latitude and longitude for the global anchor). If we reduce the scale, we get incorrect values for lat/long at that location. The smaller the scale, the bigger the error.

We test it right now by placing a sphere with a global anchor component on the map at a position with known real-world coordinates. We then change the map’s scale and check the actor’s position. The sphere gradually moves away from the initial position on the map (actor’s lat/long stay the same) and glides under the map.

Are we missing something here?

Screenshot with scale 100:

Screenshot with scale 20:

I can’t help with this unfortunately but just wanted to say I have also had the same issue when using the georeference scale (UE 5.3 & Cesium 2.4.0)

Hi @tiuri, thanks for posting the detailed screenshots! And thank you @SimonLation for confirming the bug with both the UE and Cesium plugin versions.

Unfortunately, I can’t seem to reproduce this issue. I am using Unreal Engine 5.3 with Cesium for Unreal 2.4.0. This is what I did:

  • Used Google Photorealistic 3D Tiles (which I inferred from your screenshot)
  • Adjusted the georeference to match yours
  • Placed a basic cube in the scene, attached CesiumGlobeAnchor component. Confirmed it was the same location as your sphere
  • Adjusted the georeference’s scale. I saw that the cube scales correctly with it.

But please, feel free to double-check my values to see if I missed something.

100% scale:

20% scale:

It’s troubling that I can’t recreate your issue. Can you check two things for me?

  • Does upgrading to the latest version of the plugin make a difference?
  • Can you share a screenshot of your world outliner? Just to check what other objects are in your scene.

We’ll keep trying to troubleshoot from there. Thank you!

@janine @tiuri I’ve found that selecting the globe anchor component and then changing the value of either:
Adjust Orientation for Globe when Moving
Teleport when Updating Transform

Results in expected behaviour. Oddly enough if you then change it back to the original value (by ticking the box, not undoing) then the expected behaviour remains. Undoing the change via Ctrl-Z then results in the incorrect behaviour as described in the original post.

Unsure what causes originally causes this to be required though.