# Entity:EnableCustomCollisions

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

```lua
Entity:EnableCustomCollisions()
```

## Açıklama

Bir varlığı, özel Lua tanımlı çarpışmaları kullanıyor olarak işaretler. Bu, [Entity:PhysicsFromMesh](https://gmod.tr/wiki/Entity:PhysicsFromMesh) sonrası gibi, varlıkların süngerimsi oyuncu çarpışmalarına sahip olması veya ışın testlerinin (trace) isabet etmemesi gibi sorunları düzeltir.

Dahili olarak `Entity:AddSolidFlags( bit.bor( FSOLID_CUSTOMRAYTEST, FSOLID_CUSTOMBOXTEST ) )` ile aynıdır.

Bu fonksiyonu [Entity:SetCustomCollisionCheck](https://gmod.tr/wiki/Entity:SetCustomCollisionCheck) ile karıştırmayın, ikisi aynı şey değildir.

### Örnek

Bir mesh tablosu oluşturur ve bunu varlığın çarpışmaları olarak atar.

```lua
function ENT:ProceduralPlatform()
	local VERTICES = {}
	for x = 1, 32 do
		for y = 1, 32 do
			table.insert( VERTICES, { pos = ( self:GetPos() + Vector( 0, 0, 1 ) ) } )
			table.insert( VERTICES, { pos = ( self:GetPos() + Vector( 0, y, 1 ) ) } )
			table.insert( VERTICES, { pos = ( self:GetPos() + Vector( x, y, 1 ) ) } )

			table.insert( VERTICES, { pos = ( self:GetPos() + Vector( 0, 0, 1 ) ) } )
			table.insert( VERTICES, { pos = ( self:GetPos() + Vector( x, y, 1 ) ) } )
			table.insert( VERTICES, { pos = ( self:GetPos() + Vector( x, 0, 1 ) ) } )
		end
	end
	self:PhysicsFromMesh( VERTICES )
	self:GetPhysicsObject():EnableMotion( false )
	self:EnableCustomCollisions()
end
```

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