Graviquarium 2

hardshell=3
 

What?

collision:

if ( 
    ( Math.abs(x1+w1/2-(x2+w2/2)) < hardshell * (w2+w1)/2 ) 
 && ( Math.abs(y1+h1/2-(y2+h2/2)) < hardshell * (h2+h1)/2 ) 
)
 

How?

attraction
 

What's next??

 
© 2003 AndreasKrueger.de (Impressum) letzte Änderung am: 03.09.2003 (AK v01)  http://www.AndreasKrueger.de/javascript