Autoadjust to keep world at y down

Hi guys, thanks for the release! It is most awesome and I had a stupendous time “flying” from Denver to LA the other night :slight_smile:

I’m running into a global issue and wanted to ask and see if future releases would address these issues or if I should roll my own code to address this.

So it looks like everything is keyed off of the Georeference origin - the tiles then get generated from this origin and therefore, gravity and sunsky work correctly. This is fine and dandy until I try to travel from, say, LA to London. If my georeference origin is LA, London is now literally on the edge of the planet and I can’t actually land on it - I fall off the side of the world, as it were.

I can think of a couple of solutions for this - one would be to consistently ping direction to the center of the planet and get a moving latlong that I can then lerp in order to keep the planet under me at all times. It would sort of be the rotational equivalent of ‘Keep World Origin Near Camera’, in a way… a ‘Keep Planet Under Me Always’ checkbox.

Would you guys think you would be implementing something like this in future builds?

1 Like

Hello @mahalobay,

Thanks for using our plugin! Our georeferencing system currently supports something very similar to your idea. Read from here to the end of our Placing Objects tutorial. We describe exactly the issue you are facing and explain some options we have provided to help you work around them. The follow up tutorial on georeferenced sublevels will allow you to build in multiple distant places like LA and Denver. When entering each of these sublevels the georeference origin is automatically set to the new location so that the world Y points to up with respect to the globe.

As described in the tutorials, objects can either be put in the sublevels or the global persistent level. Anything in the global level must be georeferenced with a CesiumGeoreferenceComponent. The reason is that, when entering a sublevel, the entire globe will shift to align to the new georeference origin and only properly “georeferenced” objects will follow that shift. Otherwise, as shown in the pictures here, the actor will appear somewhere completely different after the georeference origin is changed.

In your case, you may wish to have airports in LA and Denver as two separate georeferenced sublevels, each with a large number of Unreal assets and even physics with the proper gravity direction in each. In the global level, you may wish to have an airplane actor with a CesiumGeoreferenceComponent added to it. Now you should be able to fly from one airport to the other and have everything work well in both locations! If further adjustments to the georeference origin are necessary on the way in between sublevels, it should be possible to directly set the origin location to your current location through blueprint on the CesiumGeoreference actor.

Just a reiterated warning of course, that you should only change the georeference origin if all actors in the global level are georeferenced.

Perfect! It sounds like I have a few different options to work with. Will try further experiments. Thanks!