Garry's Mod Wiki


  Entity constraint.Axis( Entity Ent1, Entity Ent2, number Bone1, number Bone2, Vector LPos1, Vector LPos2, number forcelimit, number torquelimit, number friction, number nocollide, Vector LocalAxis, boolean DontAddTable )


Creates an axis constraint.


1 Entity Ent1
First entity.
2 Entity Ent2
Second entity.
3 number Bone1
Bone of first entity (0 for non-ragdolls)
4 number Bone2
Bone of second entity (0 for non-ragdolls)
5 Vector LPos1
Position on the first entity, in its local space coordinates.
6 Vector LPos2
Position on the second entity, in its local space coordinates.
7 number forcelimit
Amount of force until it breaks (0 = unbreakable)
8 number torquelimit
Amount of torque (rotational force) until it breaks (0 = unbreakable)
9 number friction
Constraint friction.
10 number nocollide
Whether the entities should be no-collided.
11 Vector LocalAxis
If you include the LocalAxis then LPos2 will not be used in the final constraint. However, LPos2 is still a required argument.
12 boolean DontAddTable
Whether or not to add the constraint info on the entity table. See constraint.AddConstraintTable.


1 Entity
Constraint. Will return false if the constraint could not be created.