phys_ragdollconstraint
From Valve Developer Community
This is a point entity available in all Source games.
Contents |
Entity Description
A constraint that fixes the position of two entities, relative to this constraint's origin. Also allows for limits on the rotation around each axis, in the space of this constraint.
Keyvalues
Targetname:
- Name <string>
- The targetname other entities refer to this entity by.
- attach1 <target_destination>
- Entity 1
- attach2 <target_destination>
- Entity 2
- constraintsystem <target_destination>
- The name of a phys_constraintsystem that this constraint should be a part of. All constraints on a set of entities should be placed in the same system, or they will fight each other during simulation.
- forcelimit <float>
- The amount of force an impact must apply to the constraint to break it. Measured in pounds. 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.
- torquelimit <float>
- The amount of torque required to break the constraint. Measured in pounds*distance (pounds*inches). 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.
- breaksound <sound>
- A sound played when the constraint is broken.
- xmin <float>
- X axis min limit. -180 min and 180 max = no constraint on this axis.
- xmax <float>
- X axis max limit. -180 min and 180 max = no constraint on this axis.
- ymin <float>
- Y axis min limit. -180 min and 180 max = no constraint on this axis.
- ymax <float>
- Y axis max limit. -180 min and 180 max = no constraint on this axis.
- zmin <float>
- Z axis min limit. -180 min and 180 max = no constraint on this axis.
- zmax <float>
- Z axis max limit. -180 min and 180 max = no constraint on this axis.
- xfriction <float>
- X axis friction
- yfriction <float>
- Y axis friction
- zfriction <float>
- Z axis friction
Flags
- 1: No Collision until break
- 2: Only limit rotation (free movement)
- 4: Start inactive
- 8: Change mass to keep stable attachment to world
Inputs
Targetname:
-
Kill - Removes this entity from the world.
-
KillHierarchy - Removes this entity and all its children from the world.
-
AddOutput <string> - Evaluates a keyvalue/output on this entity. It can be potentially very dangerous, use with care.
- Format:
<key> <value> - Format:
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite> -
FireUser1toFireUser4 - Fire the
OnUseroutputs; see User Inputs and Outputs.
- Break
- Force the constraint to break.
- TurnOn
- Enable the constraint. Do this when the objects don't exist when the constraint spawns, or when you have deactivated the constraint. Broken constraints can not be turned on. They have been deleted.
- TurnOff
- Disable this constraint.
Outputs
Targetname:
-
OnUser1toOnUser4 - Fired in response to the
FireUserinputs; see User Inputs and Outputs. -
OnKilled(New with Left 4 Dead) - Fired when the entity is killed and removed from the game.
- OnBreak
- Fired when the constraint breaks.
