Revision Difference
constraint.Axis#560648
<function name="Axis" parent="constraint" type="libraryfunc">
	<description>Creates an axis constraint.</description>
	<realm>Server</realm>
	<file line="773-L830">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" default="0">Amount of force until it breaks (0 = unbreakable)</arg>
		<arg name="torquelimit" type="number" default="0">Amount of torque (rotational force) until it breaks (0 = unbreakable)</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">Position relative to the the second physics object to constrain to.</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 (rotational force) until it breaks (0 = unbreakable)</arg>⤶
		<arg name="friction" type="number" default="0">Constraint friction.</arg>
		<arg name="nocollide" type="number" default="0">Whether the entities should be no-collided.</arg>
		<arg name="LocalAxis" type="Vector" default="nil">If you include the LocalAxis then LPos2 will not be used in the final constraint. However, LPos2 is still a required argument.</arg>
		<arg name="DontAddTable" type="boolean" default="false">Whether or not to add the constraint info on the entity table. See <page>constraint.AddConstraintTable</page>.</arg>
		<arg name="noCollide" type="number" default="0">Whether the entities should be no-collided.</arg>
		<arg name="localAxis" type="Vector" default="nil">If you include the LocalAxis then LPos2 will not be used in the final constraint. However, LPos2 is still a required argument.</arg>
		<arg name="dontAddTable" type="boolean" default="false">Whether or not to add the constraint info on the entity table. See <page>constraint.AddConstraintTable</page>.</arg>
	</args>
	<rets>
		<ret name="" type="Entity">Constraint. Will return false if the constraint could not be created.</ret>
		<ret name="" type="Entity">The created constraint. ([phys_hinge](https://developer.valvesoftware.com/wiki/Phys_hinge)) Will return `false` if the constraint could not be created.</ret>
	</rets>
</function>
 Garry's Mod
			Garry's Mod 
		 Rust
			Rust 
		 Steamworks
			Steamworks 
		 Wiki Help
			Wiki Help