@ryeon wrote:
Hi.
I am using a chipmunk.
I have questions.Why is it slow when moving touch to the joint?
chipmunk C examples are faster movement speed.my code(cocos2d-x)
PhysicsJointPin* joint = PhysicsJointPin::construct(_boardJoint->getPhysicsBody(), _board->getPhysicsBody(), _boardJoint->getPosition()); getSceneWorld()->addJoint(joint);
= A little slow
chipmunk C example :
// Use the closest point on the surface if the click is outside of the shape. cpVect nearest = (info.distance > 0.0f ? info.point : ChipmunkDemoMouse); cpBody *body = cpShapeGetBody(shape); mouse_joint = cpPivotJointNew2(mouse_body, body, cpvzero, cpBodyWorldToLocal(body, nearest)); mouse_joint->maxForce = 50000.0f; mouse_joint->errorBias = cpfpow(1.0f - 0.15f, 60.0f); cpSpaceAddConstraint(space, mouse_joint);
= QUICK!!
body-> setMass (0.1)
joint-> set MaxForce (9999 ...)
Also set to slow.Other What I can do?
Thank.
Posts: 1
Participants: 1