Revision Difference
phys_slideconstraint#547351
<title>phys_slideconstraint</title>
# phys_slideconstraint
A constraint that constrains an entity along a line segment.
In code, it is defined in `SlideConstraint.cs` file under `addons\base\code\Entity\Hammer\Constraints`
In code, it is defined in the `SlideConstraint.cs` file under `addons\base\code\Entity\Hammer\Constraints`
## Keyvalues
**Name (`targetname`)**
>* The name that other entities refer to this entity by.
**Tags (`tags`)**
>* A list of general purpose tags for this entity, for interactions with other entities such as triggers.
**Sliding Axis (`slideaxis`)**
**Sliding Friction (`slidefriction`)**
>* Set motor friction, 0 = no friction, 1 = friction that is about enough to counter gravity
**Initial Offset (`initialoffset`)**
>* Initial offset in the range from -1 to 1 where -1 means spawn at the min limit, 0 means apply no offset, and 1 means spawn at max limit.
**Enable Linear Constraint (`enablelinearconstraint)**
**Enable Angular Constraint (`enableangularconstraint`)**
**Motor frequency (`motorfrequency`)**
>* Range 0 - 30 (only used when driving the relative offset through the offset input).
**Motor damping ratio (`motordampingratio`)**
>* Range 0 - 1 (only used when driving the relative offset through the offset input).
**Motor max force (`motormaxforcemultiplier`)**
>* Measured in multiples (e.g. 10x) of the mass where zero means NO limit (only used when driving the relative offset through the offset input).
**Force Pivot (`useEntityPivot`)**
>* Force joint position as constraint pivot.
**Limit End Point (`limitendpoint`)**
>* Stop at the end point.
**Entity 1 (`attach1`)**
>* The source entity to constrain from. Leave empty to constrain from the world entity.
**Entity 2 (`attach2`)**
>* The entity we constrain to.
**Enable Collision (`enablecollision`)**
>* Constraints disable collision between the attached entities. In some rare cases we want to enable this collision.
**Impulse Limit to Break (kg) (`forcelimit`)**
>* The amount of impulse an impact must apply to the constraint to break it. A way of calculating this is to set it to the mass of an object that would break this constraint if it were resting on the constrainted objects.
**Angular Impulse Limit to Break (kg* distance) (`torquelimit`)**
>* The amount of angular impulse required to break the constraint. A way of calculating this is to multiply any reference mass by the resting distance (from the center of mass of the object) needed to break the constraint.
**Play Sound on Break (`breaksound`)**
>* A sound played when the constraint is broken.