Problem
After upgrading to Unity 5.3.4f1, I noticed an odd behavior in my Block Breaker. Ball tends to smash and go through blocks hitting block behind it, or crashing through it.
Expected behavior
Ball should bounce after each hit
is it only going through certain block types?
Any errors / warnings showing in console.
Walk through the mechanics of what should be happening, and check each step against what is within the vid), going to be a process of logical steps to what should happen against what is happening, like…
Is the collision being registered with the brick and ball. if not break that part down first.
does the brick take damage. if not why
etc
or have a run through collision detection with the bricks section again. follow it through and see if anything has changed, I know that sometimes when you upgrade mid project it messes up the tag assignments sometimes.
Just as a bit of advice for future, I would say its best to complete a project first before upgrading the editor.
That way it will be consistent throughout that projects lifetime, and once you upgrade the version you have a clean slate for starting the next project.
(done it myself, once and once only, as it caused numerous head scratching hours to go back and resolve)
It does register the hit, so block eather cracks or gets destroyed, but it’s like the ball has strong force and doesn’t get deflected sometimes. It continues up.
Thanks. I’ll do more debugging. I had the full project running, and only upgraded towards the end. The collision is definitely registering as the block cracks or gets destroyed. The ball trajectory doesn’t always change however. Sometimes it keeps moving in same direction.
I will give it more look. I just thought it may not be only. Apparently it is somehow.
hmmm , it should work , you do this change on the brick Script only , if it remains the same , then remove the “Destroy(gameObject);” line , and check if the ball goes through the brick , if it does then check your colliders weather if they are set as isTrigger or not , if its not set as isTrigger then use the “OnCollisionExit2D(Collision2D collosion)” good luck @Bashar
Sorry, might have not explained clearly. The block is getting cracked and damaged. Problem is with the ball not stopping after collision. So change should be at ball script.
can i see both the ball and the brick code? , and if u can upload a screen shot to collider settings for both of them , i might be able to help more @Bashar
Thanks for posting this question and solution (changing collision detection from discrete to continuous) - I was having the same issue with the ball falling through the paddle!