浏览代码

Merge branch 'master' of https://github.com/BabylonJS/Babylon.js

David Catuhe 5 年之前
父节点
当前提交
863115e09d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Behaviors/Meshes/pointerDragBehavior.ts

+ 1 - 1
src/Behaviors/Meshes/pointerDragBehavior.ts

@@ -252,7 +252,7 @@ export class PointerDragBehavior implements Behavior<AbstractMesh> {
 
         // Reattach camera controls
         if (this.detachCameraControls && this._attachedElement && this._scene.activeCamera && !this._scene.activeCamera.leftCamera) {
-            this._scene.activeCamera.attachControl(this._attachedElement, true);
+            this._scene.activeCamera.attachControl(this._attachedElement, this._scene.activeCamera.inputs ? this._scene.activeCamera.inputs.noPreventDefault : true);
         }
     }