Zooms the camera in/out. Args: zoom_factor: A floating point value, by how much to zoom the camera. Positive values zoom the camera in, negative values zoom it out.
(self, zoom_factor)
| 424 | self._camera.move(self._action.watermark, viewport_offset) |
| 425 | |
| 426 | def zoom(self, zoom_factor): |
| 427 | """Zooms the camera in/out. |
| 428 | |
| 429 | Args: |
| 430 | zoom_factor: A floating point value, by how much to zoom the camera. |
| 431 | Positive values zoom the camera in, negative values zoom it out. |
| 432 | """ |
| 433 | if self._active: |
| 434 | offset = [0, _SCROLL_SPEED_FACTOR * zoom_factor * -1.] |
| 435 | self._camera.move(mujoco.mjtMouse.mjMOUSE_ZOOM, offset) |
| 436 | |
| 437 | def track(self): |
| 438 | """Makes the camera track the currently selected object. |