Coordinate systems don't align perfectly

Hi, I identify a position using google maps, take the coordinates from there and feed them into the cesiumgeoreference actor but when I reset the thirdpersoncharacter to location 000 it is below the ground level… If i then increase Z, its not positioned at the origin.
How can i position my 3rd person accurately please?


The Cesium Georeference takes 3 values to set a location - longitude, latitude, and height. The height is essentially the elevation of a given location. Try adjusting the Origin Height parameter on the Georeference actor. It may help to look up the elevation of your location, or you can just raise it until it looks right.

Let me know if you need any further help with this.

Hi, no its more than that. When i fly between 2 levels in Cesium, i want to have a thirdpersoncharacter to run about with when i visit either level, but i cannot work out how to do this… i have tried loads of different options but not the right solution it seems…
i have followed the tutorial very carefully but the character works fine in one level but not in the other. How do i use the player controller in 2 or more levels… that is said better than before :slight_smile: sorry…

1 Like

Hello @Muttjob ,

In the georeferenced sublevels tutorial, we used separate character controllers in each sublevel and used the FloatingPawn to fly between the levels. This means the FloatingPawn exists in the global persistent level, and the individual character controllers exist in the sublevels. To possess each of these we had keys bound within the corresponding level’s blueprint to possess the pawn or the character.

If you need the character controller itself to move between the sublevels, you must put it in the global persistent level and add a CesiumGeoreferenceComponent to the controller. All “global” objects, i.e., objects in the persistent level, need to be georeferenced as is explained in this tutorial.

Thanks for going through the documentation! As the plugin and documentation are both in very early stages, feel free to give feedback on anything that is unclear in our tutorials.

1 Like

are you saying here " Changing the CesiumGeoreference world origin should be avoided while actively building a sublevel… . At worst, the alignment of recently added objects will be completely lost." that you can only create one level at a time and you cannot edit a level later? Because that could explain the problems i am having? that is a big limitation if that is true…

Hi @Muttjob ,

In the editor, only one georeferenced sublevel can be edited at a time, all others should be unloaded or set to invisible. You can however freely switch between levels whenever you would like to work on previous sublevels. To do this, please unload your current level, load the sublevel you wish to work on, and then in the CesiumGeoreference actor type in the index of the sublevel you wish to work on in the Current Level Index property. You can check which index corresponds to which sublevel by looking in the Cesium Sub Levels array that’s also on the Cesium Georeference actor. Setting this index basically resets the global CesiumGeoreference to be aligned with the desired sublevel.

Note that during playmode, you should be able to freely move between sublevels since the CesiumGeoreference automatically snaps to the sublevel when you approach it (this is why things in the global persistent level need to be georeferenced).

We are currently working on ways to automate more of the process of building sublevels in the editor, in order to make all this a little easier and faster.

Thank you Nithin, that is probably very helpful i didn’t realise this. I’ve isolated the problem now.
I used the same code you have in the demo for moving between levels and that works fine, the code to switch between man and vehicle works fine on both levels BUT… if i move say the vehicle on level 1 and then press ‘2’ to fly to level 2… UE crashes…

@Muttjob ,

Ah I see, I can replicate it now! Before you “fly to” the other level, you need to switch out of the vehicle and possess the FloatingPawn first. You can automatically do this by adding another step to the custom fly-to events:

Possess the FloatingPawn first before flying to the destination.

I’ve opened this issue to fix that crash in cases where “fly to” is triggered without possessing the pawn first.

Does this solve your problem?

Yes :slight_smile: thank you Nithin… i had already tried to use Un possess and then possess which for some reason hadn’t worked but your node diagram was perfect. it all works lovely now :slight_smile:
Except the vehicle keeps falling off the world with the following error:
Attempting to move a fully simulated skeletal mesh VehicleMesh. Please use the Teleport flag

the local coordinate system appears skewed.I place the cube on the ground, place the character on the cubes, hit play and they’re 1/2 mile up in the air

Hello @Muttjob ,

That’s great! And I am able to see the error message too, thanks for finding that. This is due to the georeference automatically changing when entering a different sublevel (I assume that’s what you did as well). Georeferenced objects are supposed to automatically compensate for the georeference change so that it doesn’t appear to have moved at all, but in this case, the auto-compensation is failing due to the teleport flag missing. We will fix this very soon, thanks for bringing it to our attention. I started this issue to fix the problem.

To the second part of your post, that sounds like an issue with the editor’s georeference being misaligned with the sublevel’s georeference. When building a sublevel, make sure the CesiumGeoreference origin is set to the georeference origin of the sublevel you are working on. To do this you can change the Current Level Index to the appropriate index or press Jump To Current Level if the index was already correct. Once these are aligned, anything you then build will show up exactly where you built it in the game.