CP::Constraint::DampedSpring
Inherits CP::Constraint / Reference / Object
Constructors
new(a : Body, b : Body, anchor_a : Vect, anchor_b : Vect, rest_length : Number, stiffness : Number, damping : Number)
Defined much like a slide joint.
- anchor_a: Anchor point a, relative to body a
- anchor_b: Anchor point b, relative to body b
- rest_length: The distance the spring wants to be at
- stiffness: The spring constant (Young's modulus)
- damping: How soft to make the damping of the spring
Instance methods
anchor_a=(anchor_a : Vect)
Sourceanchor_b=(anchor_b : Vect)
Sourcedamping=(damping : Number)
Sourcerest_length=(rest_length : Number)
Sourcestiffness=(stiffness : Number)
Source