PDA

View Full Version : [help] how to let the rectangle bounce back?



StraxorX
11-13-2011, 12:19 PM
how to let rectangle that moves around and bounce back when it hits the border of the window?

I'm stuck with the bounce back of the border.

BionicBytes
11-14-2011, 02:32 AM
Another homework assignment?
Which part are you stuck with?
A) Detecting the border and thus deciding when to bounce back
B) Subtracting rather than adding to the current position?