# Entity:SetEyeTarget

- **Ortam:** İstemci, Sunucu
- **İngilizce aslı:** https://wiki.facepunch.com/gmod/Entity:SetEyeTarget
- **Çeviri tarihi:** 2025-09-08

```lua
Entity:SetEyeTarget( Vector pos )
```

## Açıklama

Bir entity'nin gözlerinin baktığı konumu ayarlar. Bu, varsayılan davranışı geçersiz kılma işlevi görür. Geçersiz kılmayı devre dışı bırakmak için `0,0,0` olarak ayarlayın.

## Argümanlar

1. [Vector](https://gmod.tr/wiki/Vector) **pos**: Eğer NPC ise, entity'nin bakacağı **dünya konumu**, Ragdoll'lar için ise `eyes` eklentilerinin önündeki **yerel bir konum**.

### Örnek

Bir NPC'nin (self) yakındaki bir oyuncunun gözlerinin içine bakmasını sağlar.

```lua
for p, ply in ipairs(player.GetAll()) do
    if(ply:EyePos():Distance(self:EyePos()) <= 60) then
        self:SetEyeTarget(ply:EyePos())
        break
    end
end
```

### Örnek

Bir entity'nin, eyeposer aracının yaptığı gibi bir vektöre bakmasını sağlar.

```lua
local lookat = Vector( 0, 0, 0 )

local attachment = ent:GetAttachment( ent:LookupAttachment( "eyes" ) )
local LocalPos, LocalAng = WorldToLocal( lookat, Angle( 0, 0, 0 ), attachment.Pos, attachment.Ang )
ent:SetEyeTarget( LocalPos )
```

- [GMod Wiki ana sayfası](https://gmod.tr/wiki)

---

[Tüm sunucular](https://gmod.tr/) · [GmodTR Launcher](https://gmod.tr/launcher) · [Rehber](https://gmod.tr/rehber) · [GMod Wiki](https://gmod.tr/wiki) · [GmodTR nedir?](https://gmod.tr/hakkinda) · [Sunucu ekle](https://gmod.tr/sunucu-ekle) · [Discord](https://discord.gg/gmodtr)

Kaynak: https://gmod.tr/wiki/Entity:SetEyeTarget
