Qbasicnews.com

Full Version: angles (what! i couldn't think a name...)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
how do you have a ball bound off a wall at the save angle that it hit? like light

[Image: bounce.GIF]
Hmmm......

Are you making a pong game with boxes? I made such a game....

let's see...

The angle changes in one of two ways, or both of two ways, when hitting a straight wall:

1) dx = -dx
2) dy = -dy

Experiment... Smile

(dx and dy are the changes to x and y each game frame)
Quote:Hmmm......

Are you making a pong game with boxes? I made such a game....

kind of but you'll see when it's done. ok... ill expirement
8)