Computer Science Canada

Oval collision help

Author:  recneps [ Sat Dec 27, 2003 12:45 pm ]
Post subject:  Oval collision help

i want to make a racing game, where you can go anywhere but a circle in the middle, but i cant seem to get the oval collision to work... maybe it doesnt work that way? i want to make it, so the car starts outside the circle in the middle, and cannot go in it? is that possible?

Author:  Andy [ Sat Dec 27, 2003 2:22 pm ]
Post subject: 

y dont u do the samething as the circle detection, but instead of plugging in the circle therum, u plug in the oval one? x^2+y^2=r1r2

Author:  Tony [ Sat Dec 27, 2003 3:55 pm ]
Post subject: 

neah, lol.

if its a perfect circle, you just check if the distance between centers of circle and the car and shorter then the radious of the circle or not 8)

Author:  AsianSensation [ Sat Dec 27, 2003 4:00 pm ]
Post subject: 

dodge_tomahawk wrote:
x^2+y^2=r1r2


you sure that's the ellipse formula?

isn't it something like this?

(x^2 / a^2) + (y^2 / b^2 )= 1

where a and b are the vertical and horizontal "radius"

Author:  recneps [ Sat Dec 27, 2003 8:27 pm ]
Post subject: 

id make it a perfect circle, and i deleted the old one lol, im gonna start fresh, and post what i get here in a day or so.

Author:  recneps [ Sun Dec 28, 2003 9:00 pm ]
Post subject: 

meh, i just scrapped this idea, ill come back to it later if i want a better game for my final project


: