Просмотр исходного кода

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

Update windowsMotionController.ts
David Catuhe 5 лет назад
Родитель
Сommit
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;
         }