Hitting a wall

When the ball hits a wall of the box:

Instead it: