Garry's Mod Wiki

CreatePhysCollidesFromModel

  table CreatePhysCollidesFromModel( string modelName )

Description

Creates PhysCollide objects for every physics object the model has. The model must be precached with util.PrecacheModel before being used with this function.

Arguments

1 string modelName
Model path to get the collision objects of.

Returns

1 table
Table of PhysCollide objects. The number of entries will match the model's physics object count. See also Entity:GetPhysicsObjectCount. Returns no value if the model doesn't exist, or has not been precached.