---
title: lookAtBoundingBox
slug: viewer-3d/methods/lookAtBoundingBox
docTags: 
createdAt: 2024-03-01T14:17:48.684Z
---

Moves the **Viewpoint** to look at the specified bounding box.

:::hint{type="info"}
The **Viewpoint** simulates the position of a camera looking at the scene.
:::

## Example

::codepen{url="https://codepen.io/Catenda/embed/MWMvmZm"}

## Usage

```javascript
const boundingBox = {
  max: {
    x: 100,
    y: 100,
    z: 100
  },
  min: {
    x: 0,
    y: 0,
    z: 0
  }
};

viewer3d.lookAtBoundingBox(boundingBox);
```

## Parameters

### boundingBox

Bounding box to look at.

| **Type**                             | **Required** |
| ------------------------------------ | ------------ |
| [Box3](docId\:w-y1d3ZvTa83YjyCEvckw) | Yes          |

### direction

Direction of the **Viewpoint**.

| **Type**                                          | **Required** |
| ------------------------------------------------- | ------------ |
| String or [Vector3](docId\:kEwRHKTC8Iq2HlT48sRFQ) | No           |

**Named Viewpoint**

Valid values are:

- `home`
- `front`
- `back`
- `left`
- `right`
- `top`
- `bottom`

