From 02c05c848310494aa52e73217f9a4899be84af8e Mon Sep 17 00:00:00 2001 From: Cyrus Vachha Date: Wed, 18 Oct 2023 11:48:53 -0700 Subject: [PATCH] Reverse up-down viewport navigation from Q and E keys (#115) Reversing the up-down viewport camera translation navigation so that Q makes the camera go down and E makes the camera to go up (earlier they were swapped). This is to match the original Nerfstudio viewer (and also similar to Unity). Regarding the up-down arrow keys for panning rotating up and down, I noticed that they are reversed compared to the earlier nerfstudio viewer, however the current direction of movement for the up down arrow keys in viser is more ideal for viewing meshes. I am wondering if there is a way to only customize the key input for the nerfstudio viewer without affecting viser for only the up down arrow keys. --- src/viser/client/src/CameraControls.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/viser/client/src/CameraControls.tsx b/src/viser/client/src/CameraControls.tsx index e256463f5..264f392da 100644 --- a/src/viser/client/src/CameraControls.tsx +++ b/src/viser/client/src/CameraControls.tsx @@ -147,10 +147,10 @@ export function SynchronizedCameraControls() { cameraControls.forward(-0.002 * event?.deltaTime, true); }); qKey.addEventListener("holding", (event) => { - cameraControls.elevate(0.002 * event?.deltaTime, true); + cameraControls.elevate(-0.002 * event?.deltaTime, true); }); eKey.addEventListener("holding", (event) => { - cameraControls.elevate(-0.002 * event?.deltaTime, true); + cameraControls.elevate(0.002 * event?.deltaTime, true); }); const leftKey = new holdEvent.KeyboardKeyHold(KEYCODE.ARROW_LEFT, 20);