phys_spring
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
- Name
(targetname)
<string> - 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
- 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.
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.