CP::Constraint::SlideJoint
Inherits CP::Constraint / Reference / Object
Like pin joints, but have a minimum and maximum distance. A chain could be modeled using this joint. It keeps the anchor points from getting too far apart, but will allow them to get closer together.
Constructors
new(a : Body, b : Body, anchor_a : Vect, anchor_b : Vect, min : Number, max : Number)
a and b are the two bodies to connect, anchor_a and anchor_b are the anchor points on those bodies, and min and max define the allowed distances of the anchor points.
Instance methods
anchor_a=(anchor_a : Vect)
Sourceanchor_b=(anchor_b : Vect)
Sourcemax=(max : Number)
Sourcemin=(min : Number)
Source