Skip to content

Commit 02c05c8

Browse files
authored
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.
1 parent e51df26 commit 02c05c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/viser/client/src/CameraControls.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ export function SynchronizedCameraControls() {
147147
cameraControls.forward(-0.002 * event?.deltaTime, true);
148148
});
149149
qKey.addEventListener("holding", (event) => {
150-
cameraControls.elevate(0.002 * event?.deltaTime, true);
150+
cameraControls.elevate(-0.002 * event?.deltaTime, true);
151151
});
152152
eKey.addEventListener("holding", (event) => {
153-
cameraControls.elevate(-0.002 * event?.deltaTime, true);
153+
cameraControls.elevate(0.002 * event?.deltaTime, true);
154154
});
155155

156156
const leftKey = new holdEvent.KeyboardKeyHold(KEYCODE.ARROW_LEFT, 20);

0 commit comments

Comments
 (0)