constraint.NoCollide

From GMod Wiki

Revision as of 05:09, 30 October 2009 by Crazy Quebecer (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax constraint.NoCollide( Entity Ent1, Entity Ent2, Number Bone1, Number Bone2 )
Where is this used?
Description:
Turns off collisions between two props.
Returns: Entity constraint
Part of Library: constraint
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Constraint.NoCollide]Constraint.NoCollide [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Example

DescriptionSpawns two objects and NoCollides them
Used onNewerServer.png
Code
local ent1 = ents.Create("prop_physics");
ent1:SetPos( Vector(0, 0, 0) );
ent1:SetModel("models/gibs/gunship_gibs_sensorarray.mdl");
ent1:Spawn();
 
local ent2 = ents.Create("prop_physics");
ent2:SetPos( Vector(0, 0, 0) );
ent2:SetModel("models/props_c17/oildrum001.mdl");
ent2:Spawn();
 
constraint.NoCollide( ent1, ent2, 0, 0 );
OutputTwo objects with no collision between them.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox