Oval collision help
Author |
Message |
recneps
![](http://www.fcpocanada.com/canada1.gif)
|
Posted: 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? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Andy
|
Posted: Sat Dec 27, 2003 2:22 pm Post subject: (No 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 |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Sat Dec 27, 2003 3:55 pm Post subject: (No 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) |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
AsianSensation
|
Posted: Sat Dec 27, 2003 4:00 pm Post subject: (No 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" |
|
|
|
|
![](images/spacer.gif) |
recneps
![](http://www.fcpocanada.com/canada1.gif)
|
Posted: Sat Dec 27, 2003 8:27 pm Post subject: (No 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. |
|
|
|
|
![](images/spacer.gif) |
recneps
![](http://www.fcpocanada.com/canada1.gif)
|
Posted: Sun Dec 28, 2003 9:00 pm Post subject: (No subject) |
|
|
meh, i just scrapped this idea, ill come back to it later if i want a better game for my final project |
|
|
|
|
![](images/spacer.gif) |
|
|