constraint.Ballsocket

From GMod Wiki

Revision as of 05:06, 30 October 2009 by Crazy Quebecer (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax constraint.Ballsocket( Entity Ent1, Entity Ent2, Number Bone1, Number Bone2, Vector LPos, Number forcelimit, Number torquelimit, Number nocollide )
Where is this used?
Description:
Creates an ball socket constraint.
Returns: Entity
Part of Library: constraint
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Constraint.Ballsocket]Constraint.Ballsocket [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Example

DescriptionCreates two wardrobes about 0,0,0 and ballsockets them together
Used onNewerServer.png
Code
local Prop1 = ents.Create( "prop_physics" ) 
if ( !ValidEntity( Prop1 ) ) then return end 
Prop1:SetModel( "models/props_c17/furnituredresser001a.mdl" ) 
Prop1:SetAngles( Angle(90, 90, 180) )
Prop1:SetPos( Vector(0, 70, 0) )
Prop1:Spawn()
local Prop2 = ents.Create( "prop_physics" ) 
if ( !ValidEntity( Prop2 ) ) then return end 
Prop2:SetModel( "models/props_c17/furnituredresser001a.mdl" ) 
Prop2:SetAngles( Angle(-90, 90, 180) )
Prop2:SetPos( Vector(0, -70, 0) )
Prop2:Spawn()
Ballsocket = constraint.Ballsocket(Prop1,Prop2,0,0,Vector(0,0,40.992),0,0,0)
OutputN/A

Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox