Tag Info

New answers tagged


Try to add setSwallowTouches (true); after creating the listener.


If you only want to change the physicsBody to static, you can do this using cocos2d-x scheduleOnce with delay = 0.0f. You might have to manually schedule the physics step but it should work in any case. For instance, let's say you want to make shapeA static when a collision is detected: bool HelloWorldScene::onContactBegin(PhysicsContact& contact) { ...


haha, solved in here http://applehelpwriter.com/2013/10/01/change-between-debug-and-release-build/. its too fast question :P


It is now quite some time after the original question was asked; Chipmunk shapes have a property called "elasticity" which is a number from 0 to 1. Setting it to 1 for both bodies you want to collide will ensure perfectly elastic collisions. However, you mentioned that you want to "keep moving bodies moving at a constant speed". This is physically incorrect ...

Top 50 recent answers are included