Tag Info

New answers tagged

0

Your problem is that you're exceeding Box2D's maximum offset-per-physics-update. This is a common mistake. There is a maximum movement limit of 2.0 units per time step give in the file b2Settings.h in the source code. Assuming that you're running at 60 updates per second, your starting velocity of 120 units per second is already exactly at Box2D's ...


-1

Big games require big bucks. Many video game companies get their loans from big banks which give money to only what they think will be sucessful thus are less likely to invest into new niches or genres they are very unsure about. Small companies have the love and heart into it so they are not as afraid as the big bankers which only see dollars in their ...


0

You can use ctx.translate(dx,dy) to scroll the camera. Alternatively, have a camera object with x,y coordinates, and when drawing game objects, draw at object.x - camera.x.


1

Overview Essentially I think your talking about the problem where objects move to far in a single update step thus allowing them to seemingly pass through walls. This is a common problem, but an understandably irritating one for the player - although sometimes it's fun. Direct Solution The most direct way of answering your question I can think of is to ...


1

I think I can help you someway. In Cocos2dx we could handle collision event with EventListenerPhysicsContact. check out this code: auto character = Sprite::create("chacracter.png"); auto body = PhysicsBody::createCircle(sprite->getContentSize().width / 2); body->setContactTestBitmask(-1); body->getFirstShape()->setMass(200); ...



Top 50 recent answers are included