Skip to content

Commit

Permalink
Reverse up-down viewport navigation from Q and E keys (#115)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cvachha authored Oct 18, 2023
1 parent e51df26 commit 02c05c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/viser/client/src/CameraControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 02c05c8

Please sign in to comment.