PDA

View Full Version : Reflection / Deflection



H4T
January 18th, 2005, 08:33 AM
I am very curious about using physics concepts in Flash, and I want to try to create a realistic billiards type situation. I didn't place this in the Games section because the information isn't specific to the game, I am talking about the Law of Reflection. To clarify, I'm talking about 2D collision behavior; when one ball hits another, at what angle does it reflect / deflect off?

I can calculate angles and reflections pretty easy by hand, on paper, with vector and ray diagrams, but I'm kind of confused as to how to get that concept on the computer. I know this can be done, from playing Flash billards games online.

I'm really looking for answers from someone who knows their math in this area, like sen or Voets maybe :) Thanks ^_^

lordkiller
January 18th, 2005, 04:08 PM
Search for "webpong.fla"(is tooo big for upload 113 KB :( ) on http://www.were-here.com/ or other sites , is the best example, or "...tenis.fla"

H4T
January 18th, 2005, 04:55 PM
Uhm, I searched were-here and Google for "webpong.fla" and "webpong" and got nothing, and the "...tenis.fla" made no sense to me what you were trying to say.

Besides, pong games involve 1D collisions, not 2D. Still looking for some help.

lordkiller
January 19th, 2005, 03:04 PM
http://www.flashkit.com/tutorials/
Somwere there ....
is 2D but any other tutorial can help U
if u want 3D search for examples :) they exist

icio
January 19th, 2005, 07:56 PM
Uhm, I searched were-here and Google for "webpong.fla" and "webpong" and got nothing, and the "...tenis.fla" made no sense to me what you were trying to say.

Besides, pong games involve 1D collisions, not 2D. Still looking for some help.

pong is 2d, i'm guessing you mean 3d

H4T
January 19th, 2005, 09:24 PM
Yes pong is 2d, but I'm talking specifically about the collisions. When the ball hits a wall, it changes its direction in dimension (x or y), not two. I guess the good pong games have 2D collisions, but still.

Again, I'm talking about collisions, not the game in general, lol. I dunno, anyway, back on topic, looking for 2D stuff...I'd really like some sort of information, I absolutely hate just FLA examples. I want to do the scripting myself, I just want to understand how to actualize it first. But I guess I might have to resort to FLAs if thats the only help people are offering.