浏览代码

Merge pull request #5663 from TrevorDev/vrHelperDisableColor

vrHelperDisableColor
David Catuhe 6 年之前
父节点
当前提交
23c29da67f
共有 2 个文件被更改,包括 8 次插入0 次删除
  1. 1 0
      dist/preview release/what's new.md
  2. 7 0
      src/Cameras/VR/babylon.vrExperienceHelper.ts

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

@@ -150,6 +150,7 @@
 - Do not clone mesh observables ([Sebavan](https://github.com/Sebavan))
 - Fixed Inspector resolution with AMD loader ([Sebavan](https://github.com/Sebavan))
 - Fix a bug when a call to `updateIndices` leads to changing the size of the index buffer by recreating the subMeshes in that case ([barroij](https://github.com/barroij))
+- Add option to disable gazeTracker color changes in vrExperienceHelper ([TrevorDev](https://github.com/TrevorDev))
 - PointerDragBehavior validateDrag predicate to stop dragging to specific points ([TrevorDev](https://github.com/TrevorDev))
 
 ### Viewer

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

@@ -444,6 +444,10 @@ module BABYLON {
          * If the gaze trackers scale should be updated to be constant size when pointing at near/far meshes
          */
         public updateGazeTrackerScale = true;
+        /**
+         * If the gaze trackers color should be updated when selecting meshes
+         */
+        public updateGazeTrackerColor = true;
 
         /**
          * The gaze tracking mesh corresponding to the left controller
@@ -1897,6 +1901,9 @@ module BABYLON {
          * @param color new color for the ray.
          */
         public changeGazeColor(color: Color3) {
+            if (!this.updateGazeTrackerColor) {
+                return;
+            }
             if (!(<StandardMaterial>this._cameraGazer._gazeTracker.material)) {
                 return;
             }