
-----------------------------------
Saad85
Mon Dec 26, 2005 12:39 am

circular collision
-----------------------------------
sorry if its come up before, but how would i go about creating a program that mimics circular collision/angular collision?

-----------------------------------
Tony
Mon Dec 26, 2005 2:22 am


-----------------------------------
You start by reading the [Turing Tutorials], in order of Turing Walkthrough

-----------------------------------
Albrecd
Mon Dec 26, 2005 8:28 am


-----------------------------------
Use Trig functions (sin, cosin, etc.)

-----------------------------------
Cervantes
Mon Dec 26, 2005 3:45 pm


-----------------------------------
A collision occurs between two circles if the distance between their centres is less than or equal to the sum of their radii.  To determine the distance between their centres, use Math.Distance.

if Math.Distance (circle1.x, circle1.y, circle2.x, circle2.y) =maxx-c1r then c1vx:=-1*abs(c1vx) c1x:=maxx-c1r end if
 if c1x=maxy-c1r then c1vy:=-1*abs(c1vy) c1y:=maxy-c1r end if
 if c1y=maxx-c2r then c2vx:=-1*abs(c2vx) c2x:=maxx-c2r end if
 if c2x=maxy-c2r then c2vy:=-1*abs(c2vy) c2y:=maxy-c2r end if
 if c2y