> For the complete documentation index, see [llms.txt](https://scripting.breeze.rip/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scripting.breeze.rip/api/functions/math.findbestvisiblepoint.md).

# math.findBestVisiblePoint

> **findBestVisiblePoint**(`eyes`, `bb`): [`Vec3`](/api/net/minecraft/util/vec3.md)

Finds the closest point on a bounding box that can be seen from the given eye position without a block in the way.

### Parameters

#### eyes

[`Vec3`](/api/net/minecraft/util/vec3.md)

The position to look from, usually the local player's eyes.

#### bb

[`AxisAlignedBB`](/api/net/minecraft/util/axisalignedbb.md)

The bounding box to look at.

### Returns

[`Vec3`](/api/net/minecraft/util/vec3.md)

The nearest unobstructed point, or null when every point is blocked.

### Remarks

Points along the vertical center of the box are preferred over its corners. This raytraces blocks, so it is not free, call it once per target per tick rather than per frame.

### Example

```ts
const target = mc.pointedEntity;
const point = math.findBestVisiblePoint(mc.player.getPositionEyes(), target.getEntityBoundingBox());
if (point !== null) script.log("visible at " + point.getY());
```
