Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
angles (what! i couldn't think a name...)
#1
how do you have a ball bound off a wall at the save angle that it hit? like light

[Image: bounce.GIF]
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#2
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)
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#3
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
[Image: sig.php]
Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.
Reply
#4
8)
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#5
http://faq.qbasicnews.com/?blast=BallToBallCollision
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)