Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
Oval collision help
Author Message
recneps

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?

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
Tony

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.
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"
recneps

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.
recneps

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
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 6 Posts ]
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: