[kinda solved?] using setFov()

I’m trying to achieve the zoom-in/out effect and setFov() works just fine:

base.camLens.setFov(angle)

Then after I did that, the lines setting the camera (position and orientation) no longer work :frowning:

base.camera.setPos(pos) 
base.camera.setHpr(hpr)

Is there anyway for me to “regain control” over the camera?

Thanks!

–Vigo

setFov does not in any way alter your ability to use setPos or setHpr. Are you sure it’s the setFov call that’s causing the issue, and not that you’re simply forgetting to call base.disableMouse() or so?

yeah it’s the keyboard control, I used “Ctrl+Z” for zoom, and I wanted to stop the zoom mode when ctrl and z are released… I didn’t know how to handle “control-up” and “z-up” together : originally I had put

self.accept("control-up" and "z-up", quitZoom)

but it didn’t work as expected, so now I’m just using “control-up” to reset zoom status.

Thank you!

Use ‘z-up’. When Control-Z is pressed, it sends ‘control-z’, but when it is released, it sends just ‘z-up’.

Note that you can see all this happen (and many more) with the command:

messenger.toggleVerbose()

David