Shorter way to stick the Ball to the paddle


Hi, so i haven’t arrived at launching the ball yet, but i stuck the ball to the paddle in 1 line of code, for launching i guess i’d just make a bool variable and do an if statement to check if it is launched or not.
This way you can position the y-position of the Ball in Unitiy and only need 1 line of code for sticking it to the paddle. It works fine for me and is easier to understand and change later in my opinion.
I think knowing how to use vectors for distancing is probably important but just overcomplicates things here in my opinion.

1 Like

Hi Kevin,

Welcome to our community, and thanks a lot for sharing your solution! :slight_smile:

Privacy & Terms