I was using x and y properties to make a ball move on a straight line. When hitting a wall (eg. x + xSpeed < 0), I just inverted the xSpeed and the ySpeed values.
Now, I want to switch to GSAP so I can get onComplete callbacks. I can easily detect when the ball goes out of the bounds, but how can I set a new tween to send the ball on the right direction, with the right x, y, duration and tween ease?
Thanks a lot for your help!