I’ve seen this problem before when people try to make Breakout games and it comes from not understanding how vectors work. It’s not an insult in any way — but if you go and brush up on how vectors and velocity work, it won’t take nearly as much time and all your programming will be better for it.
One of the most common misconceptions is that the random vector you get when you bounce off something is your current velocity. It’s not. Your current ball velocity after a bounce is based on four things: your previous speed, your previous direction, your new speed, and your new direction. All of that added together is basically your velocity.
So often what’s happening when you try to add a randomized direction after a bounce is that you’re not taking into account your previous bounce velocity. ,: You when you add a random direction and speed, you’re either increasing your current velocity or decreasing. Sometimes you might decrease it so much, it increases in the other direction, but your overall speed will still appear decreased.
Picture a game of musical chairs. You start out on the left-most chair when the music starts. We’ll cal this chair #1. As you go five chairs over (chair #6), the music stops. You scramble to any random chair that’s available within reach: your current chair or one up to two chairs away in either direction. So you end up in chair #4, #5, #6, #7, or #8.
Now let’s say an outside observer comes in to restart the music and he notices how far you’ve moved. Now if you moved from Chair #1 to Chair #8, it must seem like you moved pretty quick when he wasn’t looking. But if you only moved from Chair #1 to Chair #4, he might wonder what you were doing the whole time.
You’re looking at the ball kind of like this outside observer. It’s got two velocity to take into account — it’s previous velocity that it was traveling and its new velocity. But you don’t see these little calculations. You only see where the ball starts from to where it ends up. From your perspective, it’s speeding up or slowing down randomly. What’s actually happening is that it’s calculating its new position based on two different velocity vectors that both get taken into account.
If you look up some youtube videos in basic vector math that can explain it with diagrams that make it far easier to understand than just reading about it. It’s easier to grasp visually then to read about it. It’s hard to describe, but when you see how it’s easier to show with a couple of line drawings as you show the directions of the object.
You just have to understand that your “fly” isn’t changing the velocity — you’re adding or subtracting to it. And neither of these two velocities are your apparent speed. Apparent speed is based on the sum of these velocities (after they’ve been added together). That’s why you may not be getting the results you want.