Procházet zdrojové kódy

Merge pull request #6421 from TrevorDev/pointerEnableInteractionsEdgeFix

disable mouse pointer gazer when pointer is not locked
sebavan před 6 roky
rodič
revize
26d0424db0

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

@@ -50,5 +50,6 @@
 - Runtime animation `goToFrame` when going back in time now correctly triggers future events when reached ([zakhenry](https://github.com/zakhenry))
 - Fixed bug in Ray.intersectsTriangle where the barycentric coordinates `bu` and `bv` being returned is actually `bv` and `bw`. ([bghgary](https://github.com/bghgary))
 - Do not call onError when creating a texture when falling back to another loader ([TrevorDev](https://github.com/TrevorDev))
+- Only cast pointer ray input when pointer is locked in webVR ([TrevorDev](https://github.com/TrevorDev))
 
 ## Breaking changes

+ 1 - 1
src/Cameras/VR/vrExperienceHelper.ts

@@ -1203,7 +1203,7 @@ export class VRExperienceHelper {
             this._castRayAndSelectObject(this._rightController);
         }
 
-        if (this._noControllerIsActive) {
+        if (this._noControllerIsActive && this._scene.getEngine().isPointerLock) {
             this._castRayAndSelectObject(this._cameraGazer);
         } else {
             this._cameraGazer._gazeTracker.isVisible = false;