Block Breaker - Ball sticks to side walls refuses to move

to make the problem clearer i took a short capture of my screen, video here:

whenever the paddle is close to one of the side walls the ball will stay glued to it, in the first clip you can see that i move the paddle away quickly to make sure the problem doesnt occur.
I turned the floor into a physics collider instead of a trigger to make sure i dont always need to have the paddle close to the wall for testing, trying to solve the problem.

The repetitive ricochet issue is mentioned in the course, and I think everyone has experienced it at some point (normally when you are desperately trying to test something else!)…

There is a part in one of the lectures when Ben adds a tweak to the ricochet so that it’s rebound is a little more random, that said I found that this wasn’t sufficient to prevent it from happening all of the time.

You could tackle it in several ways, in fact a few people have already posted how they over came it, for example;

  • you could adjust Ben’s tweak to make it more dramatic (quick fix but not ideal)
  • you could check the vector and only use it if the angle is greater than a certain value
  • you could consider the point of impact on the paddle and adjust the vector based on that (note, I can confirm this won’t eradicate the issue completely on it’s own)
  • you could add a count for the number of times a repetitive rebound occurs and then blow the ball up (at perhaps no cost to the player), or, maybe trigger a really exaggerated vector at this point and have it bounce off randomly.

The original Arkanoid did something rather similar to the last suggestion above, I have it on the XBox at the moment and it is riddled with bugs! lol…

Incidentally, it can (and does) occur horizontally as well as vertically.

Thanks for the answer!

I had not yet gotten to that point in the tutorial, i just assumed that since it hadnt been mentioned in the tutorial it was a problem that specifically I was having…
Thanks for the different suggested options too, food for thought.

1 Like

There’s a few thousand people here right now thinking “I wish that had been the case!” :wink:

Thanks for the different suggested options too, food for thought.

No worries, more than welcome :slight_smile:

Privacy & Terms