I'm trying to create a simple lever, like the one in figure
I want the user move his finger where the arrow is, and have load jumping depending by the speed of the movement
I'm using Chipmunk and SpaceManager
I've tried a lot of time, but seems I'm not able to do that…
the method that looks similar to what I want is the SpaceManager method
Code: Select all
/*! Explosion, applied linear force to objects within radius given a group and layer(s) */
-(void) applyLinearExplosionAt:(cpVect)at radius:(cpFloat)radius maxForce:(cpFloat)maxForce layers:(cpLayers)layers group:(cpGroup)group;
I tried to divide the object in little parts, and the applyLinearExplosionAt works… but I can't glue the parts! if I merge the shapes obviously the forse is in the center of the merged shape…
I tried to use pin joints, but they are unstable, and I couldn't find a more "solid" joint…
The idea now is to create a little shape where the user have is finger, and one again everytime he moves… then the shape will fall with an high speed and with a mass decreasing (and destruct the object when ir have mass 0)… the gravity shoul do the rest of work...
but I think that spamming object like this is not a very efficient way…
so… help! (I've a feeling the solution is really easy)