# isLineOfSightClear (Cliente)

> Indica si nada bloquea el segmento entre dos puntos. Solo bloquean edificios y objetos, no vehículos ni peds.

- **Plataforma**: MY Multiplayer (MYMP)
- **Tipo**: Función Lua
- **Lado**: Cliente
- **Categoría**: Mundo y clima
- **URL**: https://wiki.mymp.gg/es/isLineOfSightClear

## Sintaxis

```lua
bool isLineOfSightClear(float startX, startY, startZ, float endX, endY, endZ)
```

## Parámetros

| Nombre | Tipo | Descripción |
| --- | --- | --- |
| `startX, startY, startZ` | `float` | Donde empieza el segmento. También acepta un `vec3`. |
| `endX, endY, endZ` | `float` | Donde termina el segmento. También acepta un `vec3`. |

## Retorno

`true` si el camino está libre.

## Ejemplo

```lua
local function canSee(ped)
    return isLineOfSightClear(getElementPosition(localPlayer), getElementPosition(ped))
end
```

## Ver también

- [processLineOfSight (Cliente)](https://wiki.mymp.gg/es/processLineOfSight.md): Lanza un rayo entre dos puntos y devuelve lo primero que toca.
- [getGroundPosition (Cliente)](https://wiki.mymp.gg/es/getGroundPosition.md): Busca el suelo justo debajo de un punto, hasta 1000 m hacia abajo. Solo cuentan edificios y objetos.
