Skip to content

Focusing point with camera #133

Description

@kingjin94

When generating more complex scenes I would like to guide the user's view to the most important elements.

The demos suggest using

viz.viewer["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/Cameras/default"].set_transform(<Some 4x4 matrix>))
viz.viewer["/Cameras/default/rotated/<object>"].set_property("position", [x, y, z])

How do you use these to move the camera close to an arbitrary position, such as (10., 0., 0.) and look at this arbitrary position?

The set_property seems to be able to reposition the camera (in the three js system where "up" = z_meshcat = +y_three_js and z_three_js = -y_meshcat). The camera seems to keep focusing on the origin. How to do you change the position the camera points at and pans around?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions