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

vr

The engine’s Virtual Reality template on OpenXR: its pawn teleports along the navigation mesh, snap turns and poses the hands; grabbable objects, a pistol and its projectiles, a 3D menu, passthrough and a spectator camera are Rust classes. Play it with Play > VR Preview and an OpenXR headset.

rusteal new MyGame --template vr

From TP_VirtualRealityBP, the engine template it is made of.

Playing it

Open the project and press Play: right thumbstick forward aims a teleport, left thumbstick snaps the view, grips grab, triggers shoot the pistol, the menu button opens the menu.

Screenshot: the vr template’s hands and teleport arc in VR Preview. (images/templates/vr.png)

Its classes

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

ClassParentFile
XRGameModeGameModeBasesrc/game_mode.rs
GrabComponentSceneComponentsrc/grab_component.rs
GrabbableSmallCubeActorsrc/grabbable.rs
MannequinsXRSkeletalMeshComponentsrc/hand.rs
HandAnimInstanceAnimInstancesrc/hand.rs
InputModifierXAxisPositiveOnlyInputModifiersrc/input_modifier.rs
MenuActorsrc/menu.rs
MenuWidgetUserWidgetsrc/menu_widget.rs
PassthroughActorsrc/passthrough.rs
XRPawnPawnsrc/pawn.rs
PistolActorsrc/pistol.rs
ProjectileActorsrc/projectile.rs
VRSpectatorActorsrc/spectator.rs
TeleportVisualizerActorsrc/teleport_visualizer.rs
Recipes taken from it: Virtual reality.