I want to use the functions of these buttons in JS in UE4

Hi @EVRTOP,

I believe that your blueprint isn’t working because you’re setting the ion asset of the Cesium World Terrain 3D Tileset mesh directly, not it’s overlay. The Cesium World Terrain object contains the geometry of the tileset, and its asset ID should always be 1. The imagery that gets applied to it is applied in a Raster Overlay component that drapes over the mesh.

Here’s the blueprint I set up - feel free to copy it for your own project.


Note that ChangeOverlay is a custom event that I created. You could also just hook up the ChangeOverlay nodes directly to the key input nodes, but I felt that this was cleaner.
This also relies on you creating a new variable called “Overlay” of the Cesium ion Raster Overlay type. That variable is initially set in Event BeginPlay.

-Alex

1 Like