Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

ar

The engine’s Handheld AR template on ARCore and ARKit: its pawn reads touch gestures to pick a detected plane, place the object on it, then move, rotate and scale it, and applies the light estimation; the plane and placeable actors and the styled menus are Rust classes. It runs in the editor; Rusteal does not build for Android or iOS yet (see Known limits).

rusteal new MyGame --template ar

From TP_HandheldARBP, the engine template it is made of.

Playing it

Open the project and press Play: tap Begin Scan, tap a plane, tap it again to place the object, drag with one finger to move it, twist or pinch with two to rotate or scale it.

Screenshot: the ar template’s start menu in the editor. (images/templates/ar.png)

Its classes

The Rust classes are in Rust/<crate>/src/; their Blueprint children, under the engine template’s names, are in Content/.

ClassParentFile
CapsuleButtonStylizedUIsrc/buttons.rs
ToggleButtonStylizedUIsrc/buttons.rs
ARGameModeGameModeBasesrc/game_mode.rs
ARPlayerControllerPlayerControllersrc/game_mode.rs
StartMenuStylizedUIsrc/menus.rs
BottomMenuStylizedUIsrc/menus.rs
InfoMenuStylizedUIsrc/menus.rs
OptionMenuStylizedUIsrc/menus.rs
MainMenuUserWidgetsrc/menus.rs
InteractionHUDUserWidgetsrc/menus.rs
ARPawnPawnsrc/pawn.rs
ProductAssetRefActorComponentsrc/placeable.rs
PlaceableActorsrc/placeable.rs
PlaneActorsrc/plane.rs
StylizedUIUserWidgetsrc/styles.rs
StructIcona structsrc/styles.rs
StructStylea structsrc/styles.rs
Recipes taken from it: Augmented reality.