فهرست منبع

Additional check for Free Camera

Dave Solares 4 سال پیش
والد
کامیت
36e727a4a7
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      src/Cameras/Inputs/freeCameraMouseInput.ts

+ 5 - 0
src/Cameras/Inputs/freeCameraMouseInput.ts

@@ -94,6 +94,11 @@ export class FreeCameraMouseInput implements ICameraInput<FreeCamera> {
                         evt.preventDefault();
                         element.focus();
                     }
+
+                    // This is required to move while pointer button is down
+                    if (engine.isPointerLock && this._onMouseMove) {
+                        this._onMouseMove(p.event);
+                    }
                 }
                 else if (p.type === PointerEventTypes.POINTERUP && srcElement) {
                     try {