Browse Source

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

David Catuhe 5 years ago
parent
commit
863115e09d
1 changed files with 1 additions and 1 deletions
  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);
         }
     }