|
|
|
 |

September 12th, 2003, 08:07 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
|
|
OT: would anyone happen to know how to calculate bouncing a ball off an angled box?
would anyone happen to know how to calculate bouncing a ball off an angled box?
[ September 12, 2003, 19:08: Message edited by: narf poit chez BOOM ]
__________________
If I only could remember half the things I'd forgot, that would be a lot of stuff, I think - I don't know; I forgot!
A* E* Se! Gd! $-- C-^- Ai** M-- S? Ss---- RA Pw? Fq Bb++@ Tcp? L++++
Some of my webcomics. I've got 400+ webcomics at Last count, some dead.
Sig updated to remove non-working links.
|

September 12th, 2003, 08:21 PM
|
 |
Captain
|
|
Join Date: Oct 2002
Location: Brazil
Posts: 827
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: OT: would anyone happen to know how to calculate bouncing a ball off an angled box?
Possibly, but I need more details.
__________________
Have you ever had... the sudden feeling... that God is out to GET YOU?
Well, my girl dumped me and I'm stuck with the raftmates from Hell in the middle of the sea and... what was the question again???
|

September 12th, 2003, 08:38 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
|
|
Re: OT: would anyone happen to know how to calculate bouncing a ball off an angled box?
ok, right now what i've got is a 3d setup, but i'm only using the x and z planes. i generate a ball at the bottom-left corner of the screen and send it at an angle from 0-90 into a bunch of boxes. the boxes are currenty square and not angled, but what i want is to randomly shoot in balls from all sides of the screen and have them bounce off rectangular boxes.
__________________
If I only could remember half the things I'd forgot, that would be a lot of stuff, I think - I don't know; I forgot!
A* E* Se! Gd! $-- C-^- Ai** M-- S? Ss---- RA Pw? Fq Bb++@ Tcp? L++++
Some of my webcomics. I've got 400+ webcomics at Last count, some dead.
Sig updated to remove non-working links.
|

September 12th, 2003, 08:49 PM
|
 |
Captain
|
|
Join Date: Oct 2002
Location: Brazil
Posts: 827
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Re: OT: would anyone happen to know how to calculate bouncing a ball off an angled box?
Easy, the incoming and outgoing angles are always equal. I can make a drawing when I get home, but for now imagine an underlined V. The underline is the box surface and the V is the ball's trajectory. Now the angle from the left side of the underline to the left of the V must be equal to the angle from the right side of the underline to the right side of the V.
This in 2-D, which is what you are using, right ?
__________________
Have you ever had... the sudden feeling... that God is out to GET YOU?
Well, my girl dumped me and I'm stuck with the raftmates from Hell in the middle of the sea and... what was the question again???
|

September 12th, 2003, 08:58 PM
|
 |
General
|
|
Join Date: Sep 2003
Location: United Kingdom
Posts: 3,603
Thanks: 0
Thanked 22 Times in 22 Posts
|
|
Re: OT: would anyone happen to know how to calculate bouncing a ball off an angled box?
*Looks at the thread* *Runs away in terror* Please, Narf, you could add a warning in the title for the ones like me who have issues with this kind of... things. 
|

September 12th, 2003, 09:10 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
|
|
Re: OT: would anyone happen to know how to calculate bouncing a ball off an angled box?
well, the objects are 3d, but it's on a flat plane.
ok, so i figure out what angle the wall is at, then:
wall at 45 degrees, ball comming in at 90, 45-90=-45, 45+-45=0. ball coming in at 270, 45-270=-225, so, if negative 360+-225=135? doesn't work there. but, since it's hitting the bottom...angle at 225, same tilt, 225-270=-45, 225--45=270. doesn't work.
i missed something, right?
what more warning do you want?
__________________
If I only could remember half the things I'd forgot, that would be a lot of stuff, I think - I don't know; I forgot!
A* E* Se! Gd! $-- C-^- Ai** M-- S? Ss---- RA Pw? Fq Bb++@ Tcp? L++++
Some of my webcomics. I've got 400+ webcomics at Last count, some dead.
Sig updated to remove non-working links.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|