unity2d change angular direction


I have been having a bit of trouble with this for a while now, my problem is in a “breakout” style game where the ball will be hitting the paddle from multiple angular directions. But as the ball hits the object I need it to change its angular direction described in the pic below

I have tried to fix this by rotating the ball when it hits the paddle/player and then adding a new force but that didnt seem to work, I was wondering how this could be accomplished.


You can change the Rigidbody.velocity. You can get the new angle using Vector3.Reflect(). You will need the normal (line in the middle) to make the calculation. Assuming the paddle is horizontal, the calculation would be:

rigidbody.velocity = Vector3.Reflect(rigidbody.velocity, Vector3.up);

But why are you doing the calculation instead of just letting Unity’s physics (2D or 3D) do the calculation?