You can use gravity easliy in cocos2d-x