3

I am working on the game with chipmunk physics (SpriteBuilder + Cocos2d v3). There is one game object with dynamic body and several "walls" (static bodies).

When my game object falls to the wall under it, it passes some through static body a bit and then the static body pushes out of himself.

This doesn't happens all times, may be 50% times. Velocity isn't very high. Game object (dynamic) falls about half of phone screen.

And. I've seen this issue only some days ago, early all was fine.

Dynamic object Rect, affected by gravity, allows rotation. Dencity = 1, Friction = 1, Elasticity = 0.3 Walls = [CCPhysicsBody bodyWithRect:objectRectForPh cornerRadius:0], all other physic parameters default.

There is no any collision handling code

1 Answers1

1

You get this problem because Chipmunk doesn't support CCD(Continuous Collision Detection). This can be solved(but as for me is not 100% guarantee) by use smaller time steps, but it uses more CPU time.

More info on official forum https://chipmunk-physics.net/forum/viewtopic.php?f=1&t=2149

KAMIKAZE
  • 420
  • 6
  • 27