Skip to content

kcking/bevy_xr_app

Repository files navigation

bevy_xr_app

Starter Bevy OpenXR App

bevy_xr_app is a ready-to-go starter template for using OpenXR with Bevy. It includes basic scene editor support (thanks to bevy_editor_pls). It also includes an OpenXR simulator with WASD + Mouse input so you can develop XR applications without putting on a headset.

bevy_xr_app is tested on both MacOS and Windows, including the built-in OpenXR simulator. Linux should work but has undergone less testing.

Simulator Demo

sim.demo.mp4

Compatibility Matrix

Device PCVR Quest Simulator
OS
MacOS ✖️
Windows
Linux

Build Instructions (click to expand)

Simulator
  • Make sure the simulator feature is enabled. Optionally enable the editor feature if desired.
  • cargo run
Quest

Build Dependencies

  • Install Android Stuido. Then install the Android SDK Platform, NDK (Side-by-Side), SDK Build-Tools, and SDK Platform-Tools using the Android Studio SDK Manager. Choose the Android SDK Platform version based on the target_sdk_version in Cargo.toml (currently 29). Feel free to install the latest version of everything else. See the following screenshots:

Android Studio Config Android Studio Config

  • Set the following Environment Variables (macOS example)
export ANDROID_HOME=$HOME/Library/Android/sdk
export ANDROID_NDK_ROOT=$ANDROID_HOME/ndk/25.1.8937393 # you may have installed a different version, check what is present
export PATH="$ANDROID_HOME/platform-tools:$ANDROID_NDK_ROOT:$PATH"
  • Install Java for the included keytool binary for signing APKs.

    • brew install openjdk on macOS
  • Download the Oculus OpenXR Mobile SDK and copy OpenXR/Libs/Android/arm64-v8a/Release/libopenxr_loader.so to libs/arm64-v8a in this project directory.

cp ~/Downloads/ovr_openxr_mobile_sdk_*/OpenXR/Libs/Android/arm64-v8a/Release/libopenxr_loader.so libs/arm64-v8a
  • Install cargo-apk CLI (cargo install -f cargo-apk)

Running

Run ./android-run.sh or ./android-run.ps1 depending on your platform.

PCVR
  • Make sure the simulator feature is disabled. The editor feature may be enabled or disabled.
  • cargo run

About

No description, website, or topics provided.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published