Explorar o código

don't add sixDofDrag scene to the last created ones

Cedric Guillemet %!s(int64=4) %!d(string=hai) anos
pai
achega
e259576f78
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Behaviors/Meshes/sixDofDragBehavior.ts

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

@@ -98,7 +98,7 @@ export class SixDofDragBehavior implements Behavior<Mesh> {
         this._ownerNode = ownerNode;
         this._scene = this._ownerNode.getScene();
         if (!SixDofDragBehavior._virtualScene) {
-            SixDofDragBehavior._virtualScene = new Scene(this._scene.getEngine());
+            SixDofDragBehavior._virtualScene = new Scene(this._scene.getEngine(), {virtual: true});
             SixDofDragBehavior._virtualScene.detachControl();
             this._scene.getEngine().scenes.pop();
         }