Sfoglia il codice sorgente

Check Event Type Touch input Camera (#8707)

Cedric Guillemet 5 anni fa
parent
commit
f08a044a2a
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      src/Cameras/Inputs/freeCameraTouchInput.ts

+ 2 - 1
src/Cameras/Inputs/freeCameraTouchInput.ts

@@ -54,7 +54,8 @@ export class FreeCameraTouchInput implements ICameraInput<FreeCamera> {
             this._pointerInput = (p) => {
             this._pointerInput = (p) => {
                 var evt = <PointerEvent>p.event;
                 var evt = <PointerEvent>p.event;
 
 
-                if (evt.pointerType === "mouse") {
+                let isMouseEvent = evt instanceof MouseEvent;
+                if (evt.pointerType === "mouse" || isMouseEvent) {
                     return;
                     return;
                 }
                 }