[UE5 Cesium] 09-Cesium for Unreal sub-level application example (below)

Effect

Switching sub-levels through button click events

 

step

Create two new Actor blueprints as GeoMarkers, named "BP_GeoMarker_BeiJing" and "BP_GeoMarker_ShangHai" respectively

 Open the two blueprints separately and add the text rendering component

 Drag the blueprint "BP_GeoMarker_BeiJing" into the specified geographic location

Control "BP_GeoMarker_BeiJing" 

 

 Control its movement to the appropriate angle and position

 If you feel small, you can adjust the zoom

Make sure "BP_GeoMarker_BeiJing" is an Actor belonging to a persistent level

 Add "Cesium Globe Anchor" component

 Create a new control blueprint and name it "BPW_Main"

 Open "BPW_Main" and add the following controls

 Open level blueprints for persistent levels

 Add the following node, when the Tab key is pressed, the mouse cursor is displayed

Create a control interface and add a button click event

 

 Drag "BP_GeoMarker_ShangHai" into the viewport

 Add the "CesiumGlobeAnchor" component

 Enter the latitude and longitude height of Shanghai

 adjust zoom

 Control it to move to a suitable viewing angle

 Add a button click event in the level blueprint

Guess you like

Origin blog.csdn.net/ChaoChao66666/article/details/131522238