Skip to content

Added VR locomotion support for Meta Quest via OpenXR#1

Open
SpencerLiang0114 wants to merge 1 commit into
lrse:mainfrom
SpencerLiang0114:cuxr-bci
Open

Added VR locomotion support for Meta Quest via OpenXR#1
SpencerLiang0114 wants to merge 1 commit into
lrse:mainfrom
SpencerLiang0114:cuxr-bci

Conversation

@SpencerLiang0114
Copy link
Copy Markdown

Summary

  • Added XR packages (manifest.json): com.unity.xr.management 4.4.0, com.unity.xr.openxr 1.9.1, com.unity.xr.oculus 4.1.2, and com.unity.inputsystem 1.7.0. Unity auto-configured the corresponding XR and OpenXR project settings.
  • Assets/Scripts/Player/VRPlayerController.cs — new locomotion script. Attach to a root XRPlayer GameObject (with CharacterController); the Main Camera should be a child. Left thumbstick moves relative to head direction; right thumbstick X turns. Falls back to WASD + mouse when no headset is active, so the scene is testable in the editor without a device.
  • Assets/Editor/VRSceneSetup.cs — editor-only utility. Adds a Forest Simulator → Setup VR Player Rig menu item that re-parents Main Camera under a new XRPlayer root and wires up the CharacterController and VRPlayerController automatically.

To build for Meta Quest

  1. Forest Simulator → Setup VR Player Rig (if not done already)
  2. Project Settings → XR Plug-in Management → Android tab → enable OpenXR + add Oculus Touch Controller Profile + tick Meta Quest Support
  3. File → Build Settings → switch platform to Android → Build & Run

@cuiqui
Copy link
Copy Markdown
Collaborator

cuiqui commented Apr 21, 2026

Hey @SpencerLiang0114! We'll review the PR in the next few days, thanks for your interest. We'd love to hear how you're using the simulator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants