Constant World Translations when determining Height above Terrain

Hi. Firstly, I was trying to retreive current terrain altitude as in this topic: How to get altitude above terrain - #3 by Raffaele_Bortoli (shortly: place a component on a Pawn below by some significant distance so it would be lower then terrain level and retreive current height above terrain by projecting a ray with LineTraceByChannel).
But I bumped into a problem: when I am moving around with my Pawn I noticed that the world’s origin keeps being rebuilt (which affects current altitude above terrain).
Example from logs:

LogLevel: WORLD TRANSLATION BEGIN {172119, -234008, -274360} -> {162435, -243913, -284556}
LogLevel: WORLD TRANSLATION END {162435, -243913, -284556} took 0.7787 ms

I decided to try flying with DynamicPawn and the result was the same.
According to this topic: Is World Origin Rebasing working? - World Creation - Epic Developer Community Forums
I figured out that there is a UWorldComposition somewhere and it has RebaseOriginDistance property which I would like to change and test if it will affect my problem.
But when I tried to get WorldComposition with

	UWorldComposition* WorldComposition = GetWorld()->WorldComposition;

it turned out that WorldComposition is nullptr. I tried doint it inside BeginPlay event of my Pawn and inside Constructor also (just to be sure).

So I have two questions:

  1. Are there any workarounds that prevent World Translation? (I suppose the most straightforwarded is just increase RebaseOriginDistance)
  2. How can access WorldComposition so it won’t be nullptr? Should I create it somehow by myself or make a component which would be inherited from it?
  3. Is there a better way to get current altitude above terrain with cesium and unreal?

Are you using Unreal Engine 4? We no longer do origin rebasing in UE5. UE4 has been unsupported by Cesium for Unreal since April, so I highly recommend upgrading your project if you can.

If you must use UE4, you can turn off the rebasing with a checkbox on the CesiumGeoreference object, something along the lines of “Keep World Origin Near Camera” (I can’t remember the exact wording used in this obsolete version). But keep in mind that UE4 uses single-precision coordinates, so without rebasing you will have precision problems if you travel far from the origin.

Sorry for a late answer.

Yes, I am using UE4. Unfortunately I can’t right now use UE5 due to project limitations.
Yes, turning off this property helped. Thank you!

But I am still interested if there are any other options for determining altitude above ground except of line tracing under the object?

Line tracing is currently the only option. We’re planning to add the ability to do height queries directly before long, but that will never come to UE4.

thanks for replies!