Physics enabled object squeezing through between two objects

Hello, I’m a bit new here. Actually been lurking for a some time now.

I’ve never actually finished anything I’ve started. Best 2K I’ve ever spent actually. At any rate, I’m trying to make a clone of Megaball (the old enhanced Arkanoids clone for Amiga). Yeah, lots of points for originality there eh? A breakout clone… totally original right? :roll:

Ok, now to the point. I’ve got just about everything fully polished gameplay wise. No known bugs except this one. The ball squeezes through between bricks and otherwise collides with the corners of bricks that are adjacent to the corners of other bricks. That is the two corners are completely flush with eahcother, so it shouldn’t be doing that.

Another thing that’s annoying is that if it hits the corner of a brick, it will not bounce off at an inverse angle like it should. Instead, it’ll often “flatten” the angle of the bounce. Lastly, if it hits a seam, if it doesn’t outright phase through the bricks, it’ll reverse direction. This is entirely undesirable.

I’m posting binaries so you can play with it and make suggestions. The reason I’m not posting code is because the only code I have for collisions is simply to tell the brick that it’s been hit or to detect collision with the bottom of the screen to “die”. The actual collisions are being handled entirely by the built in physics engine. I’d like to keep it that way if possible because I intend on putting in non-square and angled bricks as soon as this problem with the ball is worked out.

PC and Mac binaries.

Any suggestions on what’s going on and how to fix it?

Did you travel the world and the seven seas? (Everybody’s looking for something…)

A couple of things to check:-

  • Do the blocks overlap? A small gap is advisable, really. If blocks overlap a little bit, it might explain strange behaviour when the ball hits a seam.
  • Is the size of the SphereCollider on the ball the same size as the ball object?

Also, a physics-controlled breakout-type game will not behave exactly as the original would, simply because the physics are more realistic. Generally with physics, objects can get stuck or run out of steam in a realistic, but game-stopping way. You might need to alter the mechanics of the game slightly to cope with these kinds of things.

If this hasn’t helped then post again and I’ll see if I can think of anything else.