class

CP::Constraint::PinJoint

Inherits CP::Constraint / Reference / Object

Keeps the anchor points at a set distance from one another.

Constructors

new(a : Body, b : Body, anchor_a : Vect, anchor_b : Vect)

a and b are the two bodies to connect, and anchor_a and anchor_b arethe anchor points on those bodies.

The distance between the two anchor points is measured when the joint is created. If you want to set a specific distance, use the setter function to override it.

Source

Instance methods

anchor_a

The location of the first anchor relative to the first body.

Source
anchor_a=(anchor_a : Vect)
Source
anchor_b

The location of the second anchor relative to the second body.

Source
anchor_b=(anchor_b : Vect)
Source
dist

The distance the joint will maintain between the two anchors.

Source
dist=(dist : Number)
Source