Pivot joints hold two points on two bodies together allowing them to rotate freely around the pivot. More...
#import <ChipmunkConstraint.h>
Inherits ChipmunkConstraint.
Public Member Functions | |
(id) | - initWithBodyA:bodyB:anchr1:anchr2: |
Initialize a pivot joint between the two bodies with the two anchor points. | |
(id) | - initWithBodyA:bodyB:pivot: |
Initialize a pivot joint between the two bodies by calculating the anchor points from the pivot point given in absolute coordinates. | |
Static Public Member Functions | |
(ChipmunkPivotJoint *) | + pivotJointWithBodyA:bodyB:anchr1:anchr2: |
Create an autoreleased pivot joint between the two bodies with the two anchor points. | |
(ChipmunkPivotJoint *) | + pivotJointWithBodyA:bodyB:pivot: |
Create an autoreleased pivot joint between the two bodies by calculating the anchor points from the pivot point given in absolute coordinates. | |
Properties | |
cpVect | anchr1 |
The anchor point on the first body. | |
cpVect | anchr2 |
The anchor point on the second body. |
Pivot joints hold two points on two bodies together allowing them to rotate freely around the pivot.
- (id) initWithBodyA: | (ChipmunkBody *) | a | ||
bodyB: | (ChipmunkBody *) | b | ||
anchr1: | (cpVect) | anchr1 | ||
anchr2: | (cpVect) | anchr2 | ||
Initialize a pivot joint between the two bodies with the two anchor points.
Make sure you have the bodies in the right place as the joint will fix itself as soon as you start simulating the space.
+ (ChipmunkPivotJoint *) pivotJointWithBodyA: | (ChipmunkBody *) | a | ||
bodyB: | (ChipmunkBody *) | b | ||
anchr1: | (cpVect) | anchr1 | ||
anchr2: | (cpVect) | anchr2 | ||
Create an autoreleased pivot joint between the two bodies with the two anchor points.
Make sure you have the bodies in the right place as the joint will fix itself as soon as you start simulating the space.