playcanvas / webvr

**Deprecated**: WebVR support for PlayCanvas WebGL Game Engine. WebVR is now supported in the PlayCanvas engine directly, this project is now considered legacy and should not be used in new projects.
https://playcanvas.com/vr
MIT License
45 stars 16 forks source link

DEPRECATED

This project is now deprecated. WebXR support for PlayCanvas is now built directly into the engine. For more information see the developer documentation: https://developer.playcanvas.com/en/user-manual/xr/

This repository is kept for legacy reasons and should not be used in new projects.


WebVR Support for PlayCanvas

The project contains scripts to run your PlayCanvas application in VR using either a Google Cardboard-style VR headset or (when using special builds of Chrome & Firefox) Oculus Rift and HTC Vive.

Requirements

For Cardboard VR any modern mobile device should work. For Oculus and Vive support you require a special build of Chromium.

How to use

  1. Make sure input_hmd.js loads first, which can be changed in Editor Settings "Scripts Loading Order".
  2. On the Entity you wish to be your camera add vrCamera to script component.
  3. By default vrCamera will start the VR mode when you click or tap the canvas.

 Options

VrCamera has a few options that are exposed on the entity in the Editor.

Known Issues

 Attribution

input_hmd.js contains a version of the WebVR Polyfill by Boris Smus.