Revision Difference
constraint.AdvBallsocket#560643
<function name="AdvBallsocket" parent="constraint" type="libraryfunc">
<description>
Creates an advanced ballsocket (ragdoll) constraint.
⤶
Uses a https://developer.valvesoftware.com/wiki/Phys_ragdollconstraint⤶
</description>⤶
Creates an advanced ballsocket (ragdoll) constraint. See <page>constraint.Ballsocket</page> for the simpler version.
⤶
</description>⤶
<realm>Server</realm>
<file line="837-L906">lua/includes/modules/constraint.lua</file>
<args>
<arg name="Ent1" type="Entity">First entity.</arg>
<arg name="Ent2" type="Entity">Second entity.</arg>
<arg name="Bone1" type="number">Bone of first entity (0 for non-ragdolls)</arg>⤶
<arg name="Bone2" type="number">Bone of second entity (0 for non-ragdolls)</arg>
<arg name="LPos1" type="Vector">Position on the first entity, in its local space coordinates.</arg>⤶
<arg name="LPos2" type="Vector">Position on the second entity, in its local space coordinates.</arg>
<arg name="forcelimit" type="number">Amount of force until it breaks (0 = unbreakable)</arg>
<arg name="torquelimit" type="number">Amount of torque (rotation speed) until it breaks (0 = unbreakable)</arg>⤶
<arg name="xmin" type="number">Minimum angle in rotations around the X axis local to the constraint.</arg>⤶
<arg name="ymin" type="number">Minimum angle in rotations around the Y axis local to the constraint.</arg>
<arg name="zmin" type="number">Minimum angle in rotations around the Z axis local to the constraint.</arg>
<arg name="xmax" type="number">Maximum angle in rotations around the X axis local to the constraint.</arg>
<arg name="ymax" type="number">Maximum angle in rotations around the Y axis local to the constraint.</arg>
<arg name="zmax" type="number">Maximum angle in rotations around the Z axis local to the constraint.</arg>
<arg name="xfric" type="number">Rotational friction in the X axis local to the constraint.</arg>
<arg name="yfric" type="number">Rotational friction in the Y axis local to the constraint.</arg>
<arg name="zfric" type="number">Rotational friction in the Z axis local to the constraint.</arg>
<arg name="onlyrotation" type="number">Only limit rotation, free movement.</arg>
<arg name="nocollide" type="number">Whether the entities should be no-collided.</arg>
<arg name="ent1" type="Entity">First entity.</arg>
<arg name="ent2" type="Entity">Second entity.</arg>
<arg name="bone1" type="number"><page>PhysObj</page> number of first entity to constrain to. (0 for non-ragdolls).⤶
⤶
See <page>Entity:TranslateBoneToPhysBone</page>.</arg>
<arg name="bone2" type="number"><page>PhysObj</page> number of second entity to constrain to. (0 for non-ragdolls).⤶
⤶
See <page>Entity:TranslateBoneToPhysBone</page>.</arg>
<arg name="localPos1" type="Vector">Position relative to the the first physics object to constrain to.</arg>
<arg name="localPos2" type="Vector" default="nil">Position relative to the the second physics object to constrain to.⤶
<warning>Does nothing!</warning>⤶
</arg>
<arg name="forceLimit" type="number" default="0">Amount of force until it breaks (0 = unbreakable)</arg>
<arg name="torqueLimit" type="number" default="0">Amount of torque (rotation speed) until it breaks (0 = unbreakable)</arg>
<arg name="xMin" type="number">Minimum angle in rotations around the X axis local to the constraint.</arg>
<arg name="yMin" type="number">Minimum angle in rotations around the Y axis local to the constraint.</arg>
<arg name="zMin" type="number">Minimum angle in rotations around the Z axis local to the constraint.</arg>
<arg name="xMax" type="number">Maximum angle in rotations around the X axis local to the constraint.</arg>
<arg name="yMax" type="number">Maximum angle in rotations around the Y axis local to the constraint.</arg>
<arg name="zMax" type="number">Maximum angle in rotations around the Z axis local to the constraint.</arg>
<arg name="xFric" type="number" default="0">Rotational friction in the X axis local to the constraint.</arg>
<arg name="yFric" type="number" default="0">Rotational friction in the Y axis local to the constraint.</arg>⤶
<arg name="zFric" type="number" default="0">Rotational friction in the Z axis local to the constraint.</arg>⤶
<arg name="onlyRotation" type="number" default="0">Only limit rotation, free movement.</arg>⤶
<arg name="noCollide" type="number" default="0">Whether the entities should be no-collided.</arg>⤶
</args>
<rets>
<ret name="" type="Entity">A phys_ragdollconstraint entity. Will return false if the constraint could not be created.</ret>
<ret name="" type="Entity">A [phys_ragdollconstraint](https://developer.valvesoftware.com/wiki/Phys_ragdollconstraint) entity. Will return `false` if the constraint could not be created.</ret>
</rets>
</function>