Simple class to implement multitouch grabbing of physics objects. More...
#import <ChipmunkMultiGrab.h>
Public Member Functions | |
(id) | - initForSpace:withSmoothing:withGrabForce: |
space is the space to grab shapes in. | |
(BOOL) | - beginLocation: |
Start tracking a new grab point. | |
(void) | - updateLocation: |
Update a grab point. | |
(void) | - endLocation: |
End a grab point. | |
Properties | |
cpLayers | layers |
Layers used for the point query when grabbing objects. | |
cpGroup | group |
Group used for the point query when grabbing objects. |
Simple class to implement multitouch grabbing of physics objects.
- (id) initForSpace: | (ChipmunkSpace *) | space | ||
withSmoothing: | (cpFloat) | smoothing | ||
withGrabForce: | (cpFloat) | force | ||
space
is the space to grab shapes in.
smoothing
is the amount of mouse smoothing to apply as percentage of remaining error per second. cpfpow(0.8, 60) is a good starting point that provides fast response, but smooth mouse updates. force
is the force the grab points can apply.