Browse Source

Merge pull request #4598 from BabylonJS/pointerToZero

Small fix that helps in specific edge cases
David Catuhe 7 năm trước cách đây
mục cha
commit
8afa46ec8e
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/babylon.scene.ts

+ 2 - 2
src/babylon.scene.ts

@@ -633,8 +633,8 @@
 
         /** Define this parameter if you are using multiple cameras and you want to specify which one should be used for pointer position */
         public cameraToUseForPointers: Nullable<Camera> = null;
-        private _pointerX: number;
-        private _pointerY: number;
+        private _pointerX: number = 0;
+        private _pointerY: number = 0;
         private _unTranslatedPointerX: number;
         private _unTranslatedPointerY: number;
         private _startingPointerPosition = new Vector2(0, 0);