class CP::Constraint::PinJoint
- CP::Constraint::PinJoint
- CP::Constraint
- Reference
- Object
Overview
Keeps the anchor points at a set distance from one another.
Defined in:
chipmunk/constraint.crConstructors
-
.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.
Instance Method Summary
-
#anchor_a : Vect
The location of the first anchor relative to the first body.
- #anchor_a=(anchor_a : Vect)
-
#anchor_b : Vect
The location of the second anchor relative to the second body.
- #anchor_b=(anchor_b : Vect)
-
#dist : Float64
The distance the joint will maintain between the two anchors.
- #dist=(dist : Number)
Instance methods inherited from class CP::Constraint
bodies : Tuple(Body, Body)
bodies,
body_a : Body
body_a,
body_b : Body
body_b,
collide_bodies=(collide_bodies : Bool)
collide_bodies=,
collide_bodies? : Bool
collide_bodies?,
error_bias : Float64
error_bias,
error_bias=(error_bias : Number)
error_bias=,
impulse : Float64
impulse,
max_bias : Float64
max_bias,
max_bias=(max_bias : Number)
max_bias=,
max_force : Float64
max_force,
max_force=(max_force : Number)
max_force=,
post_solve(space : Space)
post_solve,
pre_solve(space : Space)
pre_solve,
space : Space | Nil
space
Constructor Detail
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.