|
@@ -10,6 +10,7 @@ module BABYLON {
|
|
|
private _observer: Observer<PointerInfo>;
|
|
|
|
|
|
private previousPosition: { x: number, y: number };
|
|
|
+ private _isPointerLock = false;
|
|
|
|
|
|
constructor(public touchEnabled = true) {
|
|
|
}
|
|
@@ -25,6 +26,12 @@ module BABYLON {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ if (this._isPointerLock && !engine.isPointerLock) {
|
|
|
+ this.previousPosition = null;
|
|
|
+ }
|
|
|
+
|
|
|
+ this._isPointerLock = engine.isPointerLock;
|
|
|
+
|
|
|
if (p.type === PointerEventTypes.POINTERDOWN) {
|
|
|
try {
|
|
|
evt.srcElement.setPointerCapture(evt.pointerId);
|