phys_spring
Jump to navigation
Jump to search
phys_spring
is a point entity available in all Source 2 games. It is a physically simulated spring. length is what's known as the "natural spring length". This is how long the spring would be if it was at rest (nothing hanging on it or attached). When you attach something to the spring, it will stretch longer than its natural length. The amount of stretch is determined by the Spring Frequency. The larger the spring frequency the less stretch in the spring.
Keyvalues
- Entity 1 (attach1) <targetname>
- First entity to attach.
- Entity 2 (attach2) <targetname>
- Second entity to attach.
- Spring Axis (springaxis) <vector>
- Use the helper. Drag it out to match the virtual spring.
- Spring Length (length) <string>
- How long the spring would be if it was at rest (nothing hanging on it or attached). 0 means the length of the brush.
- Frequency (frequency) <string>
- The stiffness of the spring. The larger the number the less the spring will stretch. The maximum should be not more than 30!
- Damping Constant (damping) <string>
- How much energy the spring loses. The larger the number, the less bouncy the spring.
- Name (targetname) <string>[ Edit ]
- The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g.
parentname
ortarget
).
Also displayed in Hammer's 2D views and Entity Report.See also: Generic Keyvalues, Inputs and Outputs available to all entities
Flags
- 1 : Force only on stretch
Inputs
- SetRestLength <float >
- Set the spring rest length.
- SetFrequency <float >
- Set the spring frequency (stiffness).
- SetDampingRatio <float >
- Set the spring damping ratio.
Base:
- RunScriptFile
- Load and execute a script file.
- RunScriptCode
- Execute a fragment of script code.
- CallScriptFunction
- Call a script function.
- CallPrivateScriptFunction
- Calls a script function from this entity's private script scope.
- CallGlobalScriptFunction
- Calls a script function in the global script scope.
- Kill
- Removes this entity from the world.
- KillHierarchy
- Removes this entity and all its children from the world.
- AddOutput
- Adds an entity I/O connection to this entity. Parameter format: OutputName→TargetName→InputName→Parameter→Delay→MaxRefires
- FireUser1 to FireUser4
- Fires the respective
OnUser
outputs; see User Inputs and Outputs.