object reflecting of a wall

hello this question might have been asked before but previous questions have not helped me.
basically i have a pong game. i have the ball moving in a 45 degree angle towards a wall on the top and bottom. i would like for it to hit the wall and bounce of at 45 degrees in the opposite direction as you would expect 2d pong game to behave but i have tried many different methods including, vector3.reflect and bouncy physic materials

thanks in advance for all answers

Assuming that x is along and y is up, and you have a velocity vector that you use to move the ball, then I think you can just do:

vel.y = -vel.y

Do this when the ball hits the top or bottom wall. This basically says if the ball was moving upwards it now moves downwards, and vice versa. The movement of the ball in the left/right direction does not change.

The Vector3.Reflect function solves this problem in 3 dimensions. You did not say what problem you have with this function. For Pong it’s probably overkill, though.