Hello.
I'm doing a Breakout-style game, and I have pratically the entire bulk of the game done.
But one thing that bothers me is the movement of the ball. - There is the paddle, and the ball bounces on it, and the ball is reflected at the same entrance angle, pretty normal and functional. But I would like to implement something like this:
- I would like to influence with the paddle the movement of the ball. Like if the ball touches the paddle very close to the edges, I would like to make the ball have a bit of deviation from the "standart" route it would normally follow (basically having a more "open" angulation when hit close to the edges). I thought doing it adding with a bit of randomness to the normal angle at the moment of collision.
Some examples:
But honestly I have no idea on how to implement this. The only thing that I could thought of was having three diferent colliders for the paddle, and make the two extremeties deal with this randomness detail, and the middle part having the normal collision without. But I'm pretty sure that's not a good way to do it. Do you guys have any tips?
Thanks.