Преглед изворни кода

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

Update windowsMotionController.ts
David Catuhe пре 5 година
родитељ
комит
3d31be1fea
1 измењених фајлова са 1 додато и 1 уклоњено
  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;
         }