MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / on_move

Method on_move

dm_control/viewer/viewer.py:419–424  ·  view source on GitHub ↗

Translates mouse moves onto camera movements.

(self, position, translation)

Source from the content-addressed store, hash-verified

417 self._camera.look_at(world_pos, _LOOK_AT_DISTANCE)
418
419 def on_move(self, position, translation):
420 """Translates mouse moves onto camera movements."""
421 del position
422 if self._action.in_progress:
423 viewport_offset = self._viewport.screen_to_viewport(translation)
424 self._camera.move(self._action.watermark, viewport_offset)
425
426 def zoom(self, zoom_factor):
427 """Zooms the camera in/out.

Calls 2

screen_to_viewportMethod · 0.80
moveMethod · 0.80