Browse Source

enable teleportaiton from webVr constructor

Trevor Baron 7 years ago
parent
commit
9dc7a6d1d4

+ 1 - 0
dist/preview release/what's new.md

@@ -11,6 +11,7 @@
 - Add webVR support for Oculus Go ([TrevorDev](https://github.com/TrevorDev))
 - Add ability to not generate polynomials harmonics upon prefiltered texture creation ([sebavan](http://www.github.com/sebavan))
 - Add predicate function to customize the list of mesh included in the computation of bounding vectors in the ```getHierarchyBoundingVectors``` method ([sebavan](http://www.github.com/sebavan))
+- Add webVR constructor options: disable laser pointer toggle, teleportation floor meshes ([TrevorDev](https://github.com/TrevorDev))
 
 ### glTF Loader
 

+ 8 - 0
src/Cameras/VR/babylon.vrExperienceHelper.ts

@@ -29,6 +29,10 @@ module BABYLON {
          * Uses the main button on the controller to toggle the laser casted. (default: true)
          */
         laserToggle?:boolean;
+        /**
+         * A list of meshes to be used as the teleportation floor. If specified, teleportation will be enabled (default: undefined)
+         */
+        floorMeshes?: Mesh[];
     }
 
     class VRExperienceHelperGazer implements IDisposable {
@@ -675,6 +679,10 @@ module BABYLON {
             //create easing functions
             this._circleEase = new CircleEase();
             this._circleEase.setEasingMode(EasingFunction.EASINGMODE_EASEINOUT);
+
+            if(this.webVROptions.floorMeshes){
+                this.enableTeleportation({floorMeshes: this.webVROptions.floorMeshes});
+            }
         }
 
         // Raised when one of the controller has loaded successfully its associated default mesh