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

Hello, I want to use the functions of these buttons in JS in UE4. Can it be realized?

If so, what should I do?

Hi @EVRTOP,

Some of the functions of those buttons can be done in Unreal now, but others can’t. I broke down each button from left to right.

  • Probably not - As far as I know, there’s not a good replacement for the search feature - your best bet would be to find the coordinates of your location outside of Unreal, and then move the Georeference Origin to those coordinates in Unreal. It’s an interesting idea, though - perhaps something we can integrate into the plugin in the future.
  • Yes - The home button can be approximated by saving a lat/long/height position as the “home”, then moving the Dynamic pawn back to that position using the Cesium for Unreal blueprint library.
  • Probably not - There’s currently no 2D mode in Unreal.
  • Yes - You can change the Raster Overlay used on the globe by changing the asset ID of the Raster Overlay Component on the Cesium World Terrain actor.
  • Unsure - The actual controls may be possible by making your own custom pawn. If you’re just asking about an instruction menu, you can make your own - see the point below.

For those marked yes in the list above, if you wanted similar buttons in your application you’d need to set them up yourself using UMG. For the home button and imagery button, you’ll need to connect the on-screen button to an event that changes the actor’s position or changes the raster overlay.

-Alex

Hello, this is how I operate:
image
After the program runs
1 is the result of this operation

2 is the result of this operation

3 is the result of this operation

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

Thank you very much :blush:

1 Like