Pin joints hold a set distance between points on two bodies. More...
#import <ChipmunkConstraint.h>
Inherits ChipmunkConstraint.
Public Member Functions | |
(id) | - initWithBodyA:bodyB:anchr1:anchr2: |
Initialize a pin joint between the two bodies with the given anchor points. | |
Static Public Member Functions | |
(ChipmunkPinJoint *) | + pinJointWithBodyA:bodyB:anchr1:anchr2: |
Create an autoreleased pin joint between the two bodies with the given anchor points. | |
Properties | |
cpVect | anchr1 |
The anchor point on the first body. | |
cpVect | anchr2 |
The anchor point on the second body. | |
cpFloat | dist |
The distance between the two anchor points that the joint keeps. |
Pin joints hold a set distance between points on two bodies.
Think of them as connecting a solid pin or rod between the two anchor points.
- (id) initWithBodyA: | (ChipmunkBody *) | a | ||
bodyB: | (ChipmunkBody *) | b | ||
anchr1: | (cpVect) | anchr1 | ||
anchr2: | (cpVect) | anchr2 | ||
Initialize a pin joint between the two bodies with the given anchor points.
The distance is calculated when the joint is initialized. It can be set explicitly using the property.
+ (ChipmunkPinJoint *) pinJointWithBodyA: | (ChipmunkBody *) | a | ||
bodyB: | (ChipmunkBody *) | b | ||
anchr1: | (cpVect) | anchr1 | ||
anchr2: | (cpVect) | anchr2 | ||
Create an autoreleased pin joint between the two bodies with the given anchor points.
The distance is calculated when the joint is initialized. It can be set explicitly using the property.