From fb39a26639a6b5f925937c635e1d116547c0ab1b Mon Sep 17 00:00:00 2001 From: Nicolas Echezarreta Date: Wed, 6 Nov 2024 11:59:13 -0300 Subject: [PATCH] add downward & upward camera movement --- .../@dcl/inspector/src/lib/babylon/decentraland/camera.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/@dcl/inspector/src/lib/babylon/decentraland/camera.ts b/packages/@dcl/inspector/src/lib/babylon/decentraland/camera.ts index ca8da68e9..100128ba8 100644 --- a/packages/@dcl/inspector/src/lib/babylon/decentraland/camera.ts +++ b/packages/@dcl/inspector/src/lib/babylon/decentraland/camera.ts @@ -145,12 +145,16 @@ export class CameraManager { camera.keysUp = [Keys.KEY_W, Keys.KEY_UP] camera.keysLeft = [Keys.KEY_A, Keys.KEY_LEFT] camera.keysRight = [Keys.KEY_D, Keys.KEY_RIGHT] + camera.keysDownward = [Keys.KEY_Q] + camera.keysUpward = [Keys.KEY_E] function isCameraMoving(): boolean { for (const key of camera.keysDown) if (keyState[key]) return true for (const key of camera.keysUp) if (keyState[key]) return true for (const key of camera.keysLeft) if (keyState[key]) return true for (const key of camera.keysRight) if (keyState[key]) return true + for (const key of camera.keysDownward) if (keyState[key]) return true + for (const key of camera.keysUpward) if (keyState[key]) return true return false }