Garry's Mod Wiki

constraint.AdvBallsocket

  Entity constraint.AdvBallsocket( Entity ent1, Entity ent2, number bone1, number bone2, Vector localPos1, Vector localPos2 = nil, number forceLimit = 0, number torqueLimit = 0, number xMin, number yMin, number zMin, number xMax, number yMax, number zMax, number xFric = 0, number yFric = 0, number zFric = 0, number onlyRotation = 0, number noCollide = 0 )

Description

Creates an advanced ballsocket (ragdoll) constraint. See constraint.Ballsocket for the simpler version.

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 localPos1
Position relative to the the first physics object to constrain to.
6 Vector localPos2 = nil
Position relative to the the second physics object to constrain to.
Does nothing!
7 number forceLimit = 0
Amount of force until it breaks (0 = unbreakable)
8 number torqueLimit = 0
Amount of torque (rotation speed) until it breaks (0 = unbreakable)
9 number xMin
Minimum angle in rotations around the X axis local to the constraint.
10 number yMin
Minimum angle in rotations around the Y axis local to the constraint.
11 number zMin
Minimum angle in rotations around the Z axis local to the constraint.
12 number xMax
Maximum angle in rotations around the X axis local to the constraint.
13 number yMax
Maximum angle in rotations around the Y axis local to the constraint.
14 number zMax
Maximum angle in rotations around the Z axis local to the constraint.
15 number xFric = 0
Rotational friction in the X axis local to the constraint.
16 number yFric = 0
Rotational friction in the Y axis local to the constraint.
17 number zFric = 0
Rotational friction in the Z axis local to the constraint.
18 number onlyRotation = 0
Only limit rotation, free movement.
19 number noCollide = 0
Whether the entities should be no-collided.

Returns

1 Entity
A phys_ragdollconstraint entity. Will return false if the constraint could not be created.