class

CP::Constraint::PivotJoint

Inherits CP::Constraint / Reference / Object

Allows two objects to pivot about a single point.

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 are the points in local coordinates where the pivot is located.

Source
new(a : Body, b : Body, pivot : Vect) : self

a and b are the two bodies to connect, and pivot is the point in world coordinates of the pivot.

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