Преглед на файлове

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;
         }