Garry's Mod Wiki

constraint.Ballsocket

  Entity constraint.Ballsocket( Entity ent1, Entity ent2, number bone1, number bone2, Vector localPos, number forcelimit = 0, number torquelimit = 0, number nocollide = 0 )

Description

Creates a ballsocket joint. See See constraint.AdvBallsocket if you also wish to limit rotation angles in some way.

Arguments

1 Entity ent1
First entity.
2 Entity ent2
Second entity.
3 number bone1
PhysObj number of first entity to constrain to. (0 for non-ragdolls).

See Entity:TranslateBoneToPhysBone.

4 number bone2
PhysObj number of second entity to constrain to. (0 for non-ragdolls).

See Entity:TranslateBoneToPhysBone.

5 Vector localPos
Center position of the joint, relative to the second entity's physics object.
6 number forcelimit = 0
Amount of force until it breaks (0 = unbreakable)
7 number torquelimit = 0
Amount of torque (rotation speed) until it breaks (0 = unbreakable)
8 number nocollide = 0
Whether the constrained entities should collided with each other or not.

Returns

1 Entity
The crated constraint. (phys_ballsocket) Will return false if the constraint could not be created.