.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $5.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #1  
Old September 12th, 2003, 08:07 PM
narf poit chez BOOM's Avatar

narf poit chez BOOM narf poit chez BOOM is offline
Shrapnel Fanatic
 
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
narf poit chez BOOM is on a distinguished road
Default 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.
Reply With Quote
  #2  
Old September 12th, 2003, 08:21 PM
Erax's Avatar

Erax Erax is offline
Captain
 
Join Date: Oct 2002
Location: Brazil
Posts: 827
Thanks: 0
Thanked 0 Times in 0 Posts
Erax is on a distinguished road
Default 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???
Reply With Quote
  #3  
Old September 12th, 2003, 08:38 PM
narf poit chez BOOM's Avatar

narf poit chez BOOM narf poit chez BOOM is offline
Shrapnel Fanatic
 
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
narf poit chez BOOM is on a distinguished road
Default 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.
Reply With Quote
  #4  
Old September 12th, 2003, 08:49 PM
Erax's Avatar

Erax Erax is offline
Captain
 
Join Date: Oct 2002
Location: Brazil
Posts: 827
Thanks: 0
Thanked 0 Times in 0 Posts
Erax is on a distinguished road
Default 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???
Reply With Quote
  #5  
Old September 12th, 2003, 08:58 PM
Alneyan's Avatar

Alneyan Alneyan is offline
General
 
Join Date: Sep 2003
Location: United Kingdom
Posts: 3,603
Thanks: 0
Thanked 22 Times in 22 Posts
Alneyan is on a distinguished road
Default 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.
Reply With Quote
  #6  
Old September 12th, 2003, 09:10 PM
narf poit chez BOOM's Avatar

narf poit chez BOOM narf poit chez BOOM is offline
Shrapnel Fanatic
 
Join Date: Mar 2003
Location: CHEESE!
Posts: 10,009
Thanks: 0
Thanked 7 Times in 1 Post
narf poit chez BOOM is on a distinguished road
Default 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.
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 01:59 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.