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

Username:   Password: 
 RegisterRegister   
 Hit Detection
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
upthescale




PostPosted: Tue Apr 18, 2006 8:25 pm   Post subject: Hit Detection

Hit Detections with ovals? Anyone wanan explain that quicktime
Sponsor
Sponsor
Sponsor
sponsor
[Gandalf]




PostPosted: Tue Apr 18, 2006 8:40 pm   Post subject: (No subject)

Ovals, or circles? If it's only circles then:
code:
if Math.Distance (ballA.x, ballA.y, ballB.x, ballB.y) <= ballA.radius + ballB.radius then
     put "Collision!"
else
     put "No collision"
end if

This checks if the distance between the centers of two circles is greater than the sum of their radii, and if so you know it is a collision.
upthescale




PostPosted: Tue Apr 18, 2006 8:43 pm   Post subject: (No subject)

math distance doesnt werk in my turing!!!!!
Cervantes




PostPosted: Tue Apr 18, 2006 8:56 pm   Post subject: (No subject)

Then make your own.
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  [ 4 Posts ]
Jump to:   


Style:  
Search: