Air Sim Unreal Error with Collisions

I have run through the code to add standard Cesium for Unreal to my Unreal project, and I have added world terrain and 3D buildings, and I have set the Origin placement for the lat/long and it all works well, but when I change a drone from 3 person to FPV view, it all of the sudden starts to collide with the terrain.

Has anyone successfully used Cesium with AirSim and Unreal?

Can you describe what you’re seeing in more detail? I don’t quite understand why colliding with terrain is a bad thing. If you want to completely disable collisions with Cesium tilesets, there’s a “Create Physics Meshes” option on the tileset that you can disable.

I agree if the elevation were accurate, here is a video of what it is doing: Cesium_error.mp4 - Google Drive

I am probably just not setting something up correctly.

Description of what you are seeing:

  1. I have 3 drones, and each mini window at the bottom shows the fpv of each, those seem to work fine
  2. You can see the terrain, and some buildings in the distance.
  3. the gray plane(surface) is the typical floor of Airsim.
  4. I tried to match the floor with the Cesium terrain by changing the Origin Height to match as close to reality.
  5. At around 9 seconds in the video you can see the mini windows start to change because the drones are moving perfectly.
  6. At around 22 seconds I change the main camera to FPV of the middle drone.
  7. Then you can see it colliding with the terrain, but it is flying 20 meters above it or at least it was until 22 seconds.
  8. The only thing I change is selecting the “/” that puts it in FPV mode.

Because you’re using UE4, Cesium will - by default - use Unreal origin rebasing feature to maintain precision by keeping the UE world origin near the main camera. So switching to the drone FPV could cause a sudden origin rebase. It’s unfortunately common that some UE objects - especially from third parties - respond poorly to origin rebasing and lose track of where they’re supposed to be when it happens. You can test if this is what’s happening by disabling “Keep World Origin Near Camera” on the CesiumGeoreference object.


Eureka, that was it, I think it is working perfectly now.

Thanks so much for the help.

I have a couple other questions, but I will post them as other topics.

Thanks again