phys_constraintsystem
From Valve Developer Community
This is a point entity available in all Source games. If you have a collection of objects connected by constraints, you may encounter vibration or jiggling. This is because each constraint is solved without regard for any others until you introduce a phys_constraintsystem.
To implement a phys_constraintsystem create one and give it a name, then select the constraints you want to group together and set it as their "Constraint System Manager".
A constraintsystem also allows you to control the number of iterations performed on the constraints, allowing you to allocate more CPU to get the solution tighter. This will help when objects of dissimilar mass are connected, as if a large-mass object is in violation of the constraint it will take more iterations for it to move to a non-violating position/orientation. Ragdolls create a constraint system internally to solve these issues.
Keyvalues
- additionaliterations <int>
- Adding iterations makes the interactions among constraints in a system tighter. It will not compensate for errors due to collision, but will help in cases where objects of disparate mass are constrained to each other.
Targetname:
- Name <string>
- The targetname other entities refer to this entity by.
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.
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.
