Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by Skwiddy

The collision detection for my breakout clone is a bit strange sometimes. Paddle / ball collisions work fine, but brick / ball aren't handled very well. Sometimes the ball passes almost all the way through a brick before it's killed (sometimes it works perfectly). Anyone else have the same problem?

1 decade ago by mimik

post some code :-)

1 decade ago by Skwiddy

I was just playing with the debugger (you mentioned it in another reply to one of my questions) and I noticed that the collision boxes were not surrounding my entities because I gave them the wrong size when I spawned them. Duh!

1 decade ago by mimik

:-)

remeber that you can play with
size: {x: 32, y: 32},
offset:{x:28 , y:40},

in your entity settings
Then you can set a smaller hitbox then graphics.

1 decade ago by quidmonkey

It's probably because your ball is colliding with two blocks during the same frame along the same axis. For example, the ball is travelling to the right, and it hits a block on the left side and gets reflected to the left; however, it also collided with another block on the same frame, which reflected it again - right back in the same direction it was going!
Page 1 of 1
« first « previous next › last »