update_camera_pose#

NyxCameraSensor.update_camera_pose(pos=None, lookat=None, up=None)[source]#

Update camera pose dynamically (applies to all envs on next render).

Detaches the camera from any rig so the specified world-space pose is used uniformly across all environments.

Parameters:
  • pos (tuple, optional) – New camera position (x, y, z) in Z-up coordinates.

  • lookat (tuple, optional) – New look-at point (x, y, z) in Z-up coordinates.

  • up (tuple, optional) – New up vector (x, y, z) in Z-up coordinates.

Example

update_camera_pose swaps the camera’s pose for the next render and detaches the sensor from any rig it was previously attached to. This is the right tool for free-roaming or scripted camera moves; if you need the camera to follow an entity per environment, configure the attachment fields on NyxCameraOptions instead.

# ``cam`` is a built NyxCameraSensor; ``scene`` is the owning Genesis Scene.
cam.update_camera_pose(
    pos    = (0.0, 0.0, 5.0),     # top-down vantage, 5 m above origin.
    lookat = (0.0, 0.0, 0.0),
    up     = (1.0, 0.0, 0.0),     # +X is "up" in the image.
)
scene.step()                       # re-render at the new pose.
frame = cam.read().rgb[0].cpu().numpy()

Note

All three arguments are optional; passing only pos leaves lookat and up unchanged. Coordinates are in Genesis Z-up world space and apply to every parallel environment uniformly — there is no per-env variant of this call. For per-env poses, attach the camera to a per-env entity through NyxCameraOptions.entity_idx / link_idx_local.