viser icon indicating copy to clipboard operation
viser copied to clipboard

[Question] Lock camera

Open mvheimburg opened this issue 11 months ago • 1 comments

First off, amazing library!!

So my question. Is it possible to lock the camera position, or event better lock selected axis (rotation and pan)?

mvheimburg avatar Feb 05 '25 19:02 mvheimburg

Hi, sorry for the delay in getting back!

There's two options here:

  1. If you want something nice, unfortunately the only way right now is to modify the client source code. There's some discussion in #366 for one way to do this.
  2. If something hackier is okay, you can see this example for writing the camera pose.
    • You could detect when the camera moves, and then "fix" the position by setting client.camera.wxyz and client.camera.position.
    • This will jitter, which may or may not be okay depending on what you're doing.

brentyi avatar Feb 10 '25 06:02 brentyi