Constrains the angle between two bodies. More...
#import <ChipmunkConstraint.h>
Inherits ChipmunkConstraint.
Instance Methods | |
(id) | - initWithBodyA:bodyB:min:max: |
Create an autoreleased rotary limit joint between the two bodies and angular range in radians. More... | |
Class Methods | |
(ChipmunkRotaryLimitJoint *) | + rotaryLimitJointWithBodyA:bodyB:min:max: |
Create an autoreleased rotary limit joint between the two bodies and angular range in radians. More... | |
![]() | |
(ChipmunkConstraint *) | + constraintFromCPConstraint: |
Get the ChipmunkConstraint object associciated with a cpConstraint pointer. More... | |
Properties | |
cpFloat | min |
The minimum angular delta of the joint in radians. | |
cpFloat | max |
The maximum angular delta of the joint in radians. | |
![]() | |
cpConstraint * | constraint |
Returns a pointer to the underlying cpConstraint C struct. | |
ChipmunkBody * | bodyA |
The first ChipmunkBody the constraint controls. | |
ChipmunkBody * | bodyB |
The second ChipmunkBody the constraint controls. | |
cpFloat | maxForce |
Maximum force this constraint is allowed to use (defalts to infinity). More... | |
cpFloat | errorBias |
The rate at which joint error is corrected. More... | |
cpFloat | maxBias |
Maximum rate (speed) that a joint can be corrected at (defaults to infinity). More... | |
id | data |
An object that this constraint is associated with. More... | |
Constrains the angle between two bodies.
This joint is often used in conjuction with a separate ChipmunkPivotJoint in order to limit the rotation around the pivot.
- (id) initWithBodyA: | (ChipmunkBody *) | a | |
bodyB: | (ChipmunkBody *) | b | |
min: | (cpFloat) | min | |
max: | (cpFloat) | max | |
Create an autoreleased rotary limit joint between the two bodies and angular range in radians.
Make sure you have the bodies in the right place as the joint will snap into shape as soon as you start simulating the space.
+ (ChipmunkRotaryLimitJoint *) rotaryLimitJointWithBodyA: | (ChipmunkBody *) | a | |
bodyB: | (ChipmunkBody *) | b | |
min: | (cpFloat) | min | |
max: | (cpFloat) | max | |
Create an autoreleased rotary limit joint between the two bodies and angular range in radians.
Make sure you have the bodies in the right place as the joint will snap into shape as soon as you start simulating the space.