Make an object follow the curvature of the earth

Hello,

How to make an object (ie. a very large plane) follow the earth curvature?

Thanks :slight_smile:

I too am interested in the solution for this. I can set an altitude for my actor, but as it moves toward/away from my origin - it gains or loses altitude because it is following line A, not line B. Is there an easy way to get it to behave as if it is on the curved line “B”?

Hi @0x974 and @VerticalVR,

Have you checked out DynamicPawn? It’s a pawn that adjusts its orientation as it travels around the Earth, so it will account for the Earth’s curvature. You can add it to your level via the Cesium panel.

Sure have, the follow up question I have is- can you point to where in the DynamicPawn’s Blueprint where that is happening? I’d like to add that behavior to another actor.

Hi @VerticalVR,

The curvature correction is actually happening in C++, in GlobeAwareDefaultPawn. So you will probably have to make adjustments to the cpp file itself.

If I am allergic to C++ and cpp files, is there any way to mimic the effect using Blueprints? :slight_smile:

In preliminary testing (and very possibly why you recommended it) building the thing I need INTO the DynamicPawn looks to be working! Thanks for the suggestion.

Hi @VerticalVR,

I completely forgot to submit my response! I don’t think you can replicate the orientation behavior in Blueprints, but the “Adjust Orientation For Globe When Moving” property on anything with a CesiumGlobeAnchor component should account for this. Regardless, glad to hear it worked out. :smile:

No worries, thanks for mentioning the “Adjust Globe…” property. That works too!