From 31cf5e99f2ff68f64c62fdffa973bb51dff15d47 Mon Sep 17 00:00:00 2001 From: Kevin Levron Date: Sun, 4 Apr 2021 21:59:57 +0200 Subject: [PATCH] change default pointer positions --- src/core/usePointer.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/usePointer.js b/src/core/usePointer.js index 568dfa5..dc200b9 100644 --- a/src/core/usePointer.js +++ b/src/core/usePointer.js @@ -8,8 +8,8 @@ export default function usePointer(options) { intersectObjects, touch = true, resetOnEnd = false, - resetPosition = new Vector2(Infinity, Infinity), - resetPositionV3 = new Vector3(Infinity, Infinity, Infinity), + resetPosition = new Vector2(0, 0), + resetPositionV3 = new Vector3(0, 0, 0), onEnter = () => {}, onMove = () => {}, onLeave = () => {}, @@ -21,7 +21,7 @@ export default function usePointer(options) { } = options; const position = resetPosition.clone(); - const positionN = new Vector2(Infinity, Infinity); + const positionN = new Vector2(0, 0); const raycaster = useRaycaster({ camera }); const positionV3 = raycaster.position;