# EyePos

- **Ortam:** İstemci
- **İngilizce aslı:** https://wiki.facepunch.com/gmod/Global.EyePos
- **Çeviri tarihi:** 2025-09-08

```lua
Vector EyePos()
```

## Açıklama

Mevcut render bağlamının [GM:CalcView](https://gmod.tr/wiki/GM:CalcView) tarafından hesaplanan başlangıç noktasını döndürür.

> **HATA:** Bu fonksiyon yalnızca render hook'ları içinde güvenilirdir.
> Hata Takipçisi: [2516](https://github.com/Facepunch/garrysmod-issues/issues/2516)

## Döndürülen Değerler

1. [Vector](https://gmod.tr/wiki/Vector): Kamera pozisyonu.

### Örnek

`EyePos` fonksiyonunun render hook'ları dışında doğru değeri döndürmesini sağlama.

```lua
local mins, maxs = Vector( -5, -5, -5 ), Vector( 5, 5, 5 )

hook.Add( "PreDrawTranslucentRenderables", "FixEyePos", function()
	EyePos()
end )

hook.Add( "Think", "Use Eyepos outside of render function", function()
	local start = EyePos()
	local dir = gui.ScreenToVector( gui.MousePos() )
	local trace = util.TraceLine({
		start = start,
		endpos = start + ( dir * 10000 ),
		filter = { ply }
	})

	debugoverlay.Box( trace.HitPos, mins, maxs )
end )
```

**Çıktı:** Farenizi doğrulttuğunuz yerde dünyada beyaz bir kutu çizer. **developer** convar'ının `1` olarak ayarlanmasını gerektirir.

- [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/Global.EyePos
