Ball bounces off corners and throws off movement

Sorry, I’m posting this here because I couldn’t figure out where else to post it, but maybe someone can help anyways. So, I’m coding my first game. This game is meant to be a remake of an old Macintosh game from like 1995 called diamonds. Feel free to look it up on youtube to get an idea of what I’m aiming for. I’ve got the basic mechanics of the game set up and the last issue that I’m having is when the ball bounces off the corner of a block, it throws off the movement of the ball to where I can’t get it to move appropriately anymore. For context, my left and right input is done via transform.Translate and the ball bounces back and forth via bounce physics on all of the objects. Everything works perfectly except for when the ball bounces off the corner of a block. The idea is that the ball should bounce up and down at all times and never left or right, but the player can move it left and right. So, I need a way that the ball won’t be thrown off course when hitting a corner of a block. Any advice would be greatly appreciated. Sorry if I’ve posted this in an inappropriate section.

Use a box collider for the ball and freeze its rotation.

1 Like

Thank you so much. Worked perfectly.