# Entity:SetPhysConstraintObjects

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

```lua
Entity:SetPhysConstraintObjects( PhysObj Phys1, PhysObj Phys2 )
```

## Açıklama

Bir kısıtlama (constraint) entity'si üzerinde çağrıldığında, kısıtlanacak iki fizik nesnesini ayarlar.

Kullanımı tavsiye edilmez, çünkü Kısıtlama (Constraint) kütüphanesi, kısıtlamalarla başa çıkmak için daha kolay yollar sunar.

## Argümanlar

1. [PhysObj](https://gmod.tr/wiki/PhysObj) **Phys1**: Kısıtlanacak ilk fizik nesnesi.
2. [PhysObj](https://gmod.tr/wiki/PhysObj) **Phys2**: Kısıtlanacak ikinci fizik nesnesi.

### Örnek

constraint.lua dosyasından alınmıştır

```lua
Constraint = ents.Create("phys_lengthconstraint")
	Constraint:SetPos( WPos1 )
	Constraint:SetKeyValue( "attachpoint", tostring(WPos2) )
	Constraint:SetKeyValue( "minlength", "0.0" )
	Constraint:SetKeyValue( "length", length + addlength )
	if ( forcelimit ) then Constraint:SetKeyValue( "forcelimit", forcelimit ) end
	if ( rigid ) then Constraint:SetKeyValue( "spawnflags", 2 ) end
	Constraint:SetPhysConstraintObjects( Phys1, Phys2 )
Constraint:Spawn()
Constraint:Activate()
```

- [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:SetPhysConstraintObjects
