Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Oval collision help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
recneps




PostPosted: 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?
Sponsor
Sponsor
Sponsor
sponsor
Andy




PostPosted: 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




PostPosted: 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)
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
AsianSensation




PostPosted: 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




PostPosted: 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




PostPosted: 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:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: