viser icon indicating copy to clipboard operation
viser copied to clipboard

I want to reset the camera's starting position and disable the left and right buttons

Open smart4654154 opened this issue 1 year ago • 1 comments

At present, the default starting position of the camera is (3, 3, 3), and users can move it freely. Now I want to set the default camera starting position at (a, b, c), and users can move it freely. Simultaneously I want to disable the left and right key functions of the keyboard(Stop rotation function). May I ask where to modify it? Thank you very much.

smart4654154 avatar Aug 01 '24 02:08 smart4654154

Hello!

The initial camera pose is set here: https://github.com/nerfstudio-project/viser/blob/e43b4ac44832016b75676bf1b5001ab9bb47f5de/src/viser/client/src/App.tsx#L291

You can also change it from Python via something like:

server = viser.ViserServer()

@server.on_client_connect
def _(client: viser.ClientHandle) -> None:
    client.camera.position = (1., 1., 1.)

For the left/right keys, the code is here: https://github.com/nerfstudio-project/viser/blob/e43b4ac44832016b75676bf1b5001ab9bb47f5de/src/viser/client/src/CameraControls.tsx#L158-L189

brentyi avatar Aug 03 '24 00:08 brentyi