Sure you will figure it out. A position vector and a speed vector. When it hits a vertical wall we change the direction of the x-position vector and for a horizontal wall we change the direction of the y-position vector. Change direction => position x / y = position x / y * -1
Attachments
Last edited: