# WorldToLocal

- **Ortam:** İstemci, Sunucu
- **İngilizce aslı:** https://wiki.facepunch.com/gmod/Global.WorldToLocal
- **Çeviri tarihi:** 2025-11-20

```lua
Vector, Angle WorldToLocal( Vector position, Angle angle, Vector newSystemOrigin, Angle newSystemAngles )
```

## Açıklama

Bir dünya uzayı vektörünü ve açısını belirli bir koordinat sistemine çevirir.

## Argümanlar

1. [Vector](https://gmod.tr/wiki/Vector) **position**: Bir dünya uzayı vektörü.
2. [Angle](https://gmod.tr/wiki/Angle) **angle**: Bir dünya uzayı açısı.
3. [Vector](https://gmod.tr/wiki/Vector) **newSystemOrigin**: Yeni koordinat sisteminin başlangıç noktası.
4. [Angle](https://gmod.tr/wiki/Angle) **newSystemAngles**: Yeni koordinat sisteminin açıları.

## Döndürülenler

1. [Vector](https://gmod.tr/wiki/Vector): Karşılık gelen yerel uzay `position` değeri
2. [Angle](https://gmod.tr/wiki/Angle): Karşılık gelen yerel uzay `angle` değeri

### Örnek

Bunun dahili olarak nasıl hesaplandığını gösteren bir matris matematiği.

```lua
local worldTransform = Matrix()
worldTransform:SetTranslation( position )
worldTransform:SetAngles( angle )

local objectTransform = Matrix()
objectTransform:SetTranslation( newSystemOrigin )
objectTransform:SetAngles( newSystemAngles )

-- Dünya koordinatlarını, nesne dönüşümünü tersine çevrilmiş bir dönüşüm matrisi olarak kullanarak dönüştürür
local worldToLocal = objectTransform:GetInverse() * worldTransform

print( worldToLocal:GetTranslation(), worldToLocal:GetAngles() )
```

- [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.WorldToLocal
