Or I can get it to bounce of the horizontal wall if I change it to this but then the ball passes through the vertical wall.
I added in a text label to show me the heading of the ball when it is flung or when it collides with a sprite hoping that I could figure it out but I'm not having much luck. I assumed that the heading of the ball went from 0 (heading directly to the right, 90 (heading directly up, 180 (heading directly left), 270 (heading directly down). In other words 0 - 360. I found however, that the ball fling heading was 0 to 180 when heading any direction upward, or 0 to -180 when heading in any direction downward.
I'm sure I'm missing something simple here. How do I code my blocks so that I get the appropriate deflection regardless of the shape of the sprite the ball is bouncing off of?