Browse Source

Merge pull request #7300 from BabylonJS/xr-small-fix

Update windowsMotionController.ts
David Catuhe 5 năm trước cách đây
mục cha
commit
3d31be1fea
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/Gamepads/Controllers/windowsMotionController.ts

+ 1 - 1
src/Gamepads/Controllers/windowsMotionController.ts

@@ -269,7 +269,7 @@ export class WindowsMotionController extends WebVRController {
 
         var meshInfo = this._loadedMeshInfo.buttonMeshes[buttonName];
 
-        if (!meshInfo.unpressed.rotationQuaternion || !meshInfo.pressed.rotationQuaternion || !meshInfo.value.rotationQuaternion) {
+        if (!meshInfo || !meshInfo.unpressed.rotationQuaternion || !meshInfo.pressed.rotationQuaternion || !meshInfo.value.rotationQuaternion) {
             return;
         }