# constraint.Motor

- **Ortam:** Sunucu
- **İngilizce aslı:** https://wiki.facepunch.com/gmod/constraint.Motor
- **Çeviri tarihi:** 2025-09-08

```lua
Entity, Entity constraint.Motor( Entity ent1, Entity ent2, number bone1, number bone2, Vector localPos1, Vector localPos2, number friction, number torque, number forcetime, number nocollide = 0, number toggle = false, Player player = NULL, number forcelimit = 0, number key_fwd = nil, number key_bwd = nil, number direction = 1, Vector localAxis = nil )
```

## Açıklama

Oyuncu tarafından kontrol edilebilen bir [constraint.Axis](https://gmod.tr/wiki/constraint.Axis) olan bir motor kısıtlaması oluşturur.

## Argümanlar

1. [Entity](https://gmod.tr/wiki/Entity) **ent1**: Birinci varlık.
2. [Entity](https://gmod.tr/wiki/Entity) **ent2**: İkinci varlık.
3. [number](https://gmod.tr/wiki/number) **bone1**: Kısıtlanacak birinci varlığın [PhysObj](https://gmod.tr/wiki/PhysObj) numarası. (Ragdoll olmayanlar için 0). [Entity:TranslateBoneToPhysBone](https://gmod.tr/wiki/Entity:TranslateBoneToPhysBone) sayfasına bakın.
4. [number](https://gmod.tr/wiki/number) **bone2**: Kısıtlanacak ikinci varlığın [PhysObj](https://gmod.tr/wiki/PhysObj) numarası. (Ragdoll olmayanlar için 0). `bone1`'den farklı olmalıdır. [Entity:TranslateBoneToPhysBone](https://gmod.tr/wiki/Entity:TranslateBoneToPhysBone) sayfasına bakın.
5. [Vector](https://gmod.tr/wiki/Vector) **localPos1**: Kısıtlanacak birinci fizik nesnesine göre konum.
6. [Vector](https://gmod.tr/wiki/Vector) **localPos2**: Kısıtlanacak ikinci fizik nesnesine göre konum.
7. [number](https://gmod.tr/wiki/number) **friction**: Motor sürtünmesi.
8. [number](https://gmod.tr/wiki/number) **torque**: Motor torku.
9. [number](https://gmod.tr/wiki/number) **forcetime**: Bu süre geçtikten sonra otomatik kapanma. 0 değeri, devre dışı bırakılana kadar veya sonsuza kadar açık kalacağı anlamına gelir.
10. [number](https://gmod.tr/wiki/number) **nocollide** = 0: Varlıkların çarpışmaz (no-collide) yapılıp yapılmayacağı.
11. [number](https://gmod.tr/wiki/number) **toggle** = false: Kısıtlamanın aç/kapa (toggle) modunda olup olmadığı.
12. [Player](https://gmod.tr/wiki/Player) **player** = NULL: Motoru kontrol edecek olan oyuncu. [numpad.OnDown](https://gmod.tr/wiki/numpad.OnDown) ve [numpad.OnUp](https://gmod.tr/wiki/numpad.OnUp) fonksiyonlarını çağırmak için kullanılır.
13. [number](https://gmod.tr/wiki/number) **forcelimit** = 0: Kırılana kadar dayanabileceği kuvvet miktarı (0 = kırılamaz)
14. [number](https://gmod.tr/wiki/number) **key_fwd** = nil: "İleri" için tuş ataması, bir [KEY enum](https://gmod.tr/wiki/Enums/KEY) değerine karşılık gelir
15. [number](https://gmod.tr/wiki/number) **key_bwd** = nil: "Geri" için tuş ataması, bir [KEY enum](https://gmod.tr/wiki/Enums/KEY) değerine karşılık gelir
16. [number](https://gmod.tr/wiki/number) **direction** = 1: Motorun hangi yöne dönmesi gerektiğini belirten `1` veya `-1` değeri.
17. [Vector](https://gmod.tr/wiki/Vector) **localAxis** = nil: Dönme eksenini geçersiz kılar mı?

## Döndürdükleri

1. [Entity](https://gmod.tr/wiki/Entity): Oluşturulan kısıtlama. ([phys_torque](https://developer.valvesoftware.com/wiki/Phys_torque)) Kısıtlama oluşturulamazsa `false` döndürür.
2. [Entity](https://gmod.tr/wiki/Entity): Oluşturulan eksen kısıtlaması. ([phys_hinge](https://developer.valvesoftware.com/wiki/Phys_hinge)) Kısıtlama oluşturulamazsa `nil` döndürür.

- [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/constraint.Motor
