Globe anchors and navigation
This chapter covers geospatial placement and camera motion: Globe Anchor, Origin Shift, Fly Controller / Fly-To, geographic sub-levels, and camera managers.
Globe Anchor
CesiumGlobeAnchorComponent keeps an entity on the ellipsoid (bidirectional LLH ↔ Transform). Useful for placing Prefabs at real-world coordinates.
| Field | Default | Purpose |
|---|---|---|
| Adjust orientation for globe when moving | true | Keep local ENU upright while moving |
| Detect transform changes | true | Engine moves rewrite LLH |
| Teleport when updating transform | true | Snap instead of interpolating physics |
| Height reference | None | Or RelativeToGround / RelativeToTileset |
| Height offset | 0 | Meters above the sampled surface |
| Height update interval | 1 | Frames between height samples |
| Tileset entity | empty | Required when height reference is RelativeToTileset |
#include <Cesium3DTiles/CesiumGlobeAnchorBus.h>
DawnCesium::CesiumGlobeAnchorRequestBus::Event(
entityId,
&DawnCesium::CesiumGlobeAnchorRequests::MoveToLongitudeLatitudeHeight,
lonDegrees, latDegrees, heightMeters);
Also available: ECEF getters/setters, East-South-Up rotation, teleport flags. When a Fly-To runs on an entity that also has a Globe Anchor, the flight writes through the anchor so height-reference and orientation semantics stay consistent.
Origin Shift
CesiumOriginShiftComponent (usually on the camera):
| Mode | Behavior |
|---|---|
UpdateRenderOrigin | Drive LargeWorld render origin (default) |
SwitchSubLevelsOnly | Only activate geographic sub-levels |
Disabled | No automatic shift |
| Field | Default | Notes |
|---|---|---|
| Distance threshold (m) | 10000 | ≤ 0 inherits LargeWorld |
| Origin cell size (m) | 0 | 0 inherits LargeWorld |
Notification: CesiumOriginShiftNotificationBus::OnRenderOriginShifted. Without this component (and LargeWorld), globe flight jitters — see
Core concepts.
Fly Controller
CesiumFlyControllerComponent: free-fly for game / play (not an editor viewport controller).
| Field | Default | Purpose |
|---|---|---|
| Base speed | 25 m/s | WASD / QE translation |
| Height speed factor | 1.0 | Scale speed with altitude |
| Maximum speed | 2e6 m/s | Hard cap |
| Boost multiplier | 5.0 | Shift |
| Mouse sensitivity | 0.2 | Right-drag look |
| Wheel speed multiplier | 1.2 | Per wheel notch |
| Override camera far clip | on | Planetary far plane |
| Far clip distance | 1e7 | Meters |
Bus: CesiumFlyControllerRequestBus (Get/SetYawPitchDegrees).
Fly-To
CesiumFlyToComponent + CesiumFlyToRequestBus:
FlyToLongitudeLatitudeHeightFlyToEcef/FlyToEngineCoordinates
| Field | Default | Notes |
|---|---|---|
| Duration | 5 s | Flight length |
| Progress / height / max-height-by-distance curves | Default | Or custom keyframes / None |
| Rotation source | EntityTransform | Or FlyController (yaw/pitch from co-located fly controller) |
Completion and interruption notify via CesiumFlyToNotificationBus.
Geographic sub-levels
CesiumSubLevelComponent: when the camera enters Load radius (default 1000 m) around a sub-level LLH origin, the switcher can re-home georeference and spawn a Prefab.
| Field | Default | Notes |
|---|---|---|
| Enabled | on | Must have a valid Prefab asset |
| Origin lon / lat / height | 0 / 0 / 0 | Sub-level geographic center |
| Load radius | 1000 m | Activation sphere |
| Prefab asset | empty | Spawned when active |
Pair with Origin Shift. Editor: Sub-Level Here places a sub-level at the current camera. Switching is multi-frame (spawn / despawn completion callbacks). Debug: cesium_drawSubLevelLoadRadii. Bus: CesiumSubLevelSwitcherRequestBus.
Cameras and LOD sources
- System:
CesiumCameraManagerSystemComponentaggregates default viewport, editor viewports, game cameras, render-to-texture, and XR eye views. - Entity:
CesiumCameraManagerComponent— soft reference target for a tileset’sCamera manager entity ID. - Per-tileset filters: Use default / editor / game / RTT / XR toggles +
Additional camera entities(see Georeference and tilesets). - Register custom LOD cameras via
CesiumCameraBus/ camera provider bus when you need non-standard views.
Next steps
- Environment, metadata, and bridges — SunSky, credits, picking.
- Recipes — GPS Prefab placement.
- Configuration and debugging — origin-shift distance warnings.