PDA

View Full Version : hitTestObject area



nicolb
May 11th, 2007, 10:52 AM
Hello !:)

I'm trying to make a simple animation with moving bubbles.
I am using the hitTestObject method to detect collision between bubbles.
The problem is that sometime bubbles seems to bounce quite far from other bubbles (about 10 pixels i guess).

You can see the swf here (http://www.graphea.com/graphea/examples/bubbles.html)

Does someone know why ? Should i use the hitTestPoint for a better result ?

Thanks

senocular
May 11th, 2007, 11:32 AM
http://www.kirupa.com/forum/showpost.php?p=1922772&postcount=4

example is in Flash 8, but the same concept applies

nicolb
May 11th, 2007, 11:40 AM
Great !
Thanks a lot Senocular !:thumb2:

kos010
May 30th, 2007, 03:10 PM
=] was lookin for this
think it might help me in a project

thats all folks
May 30th, 2007, 03:51 PM
ahhhhh this helps me out thanks!!!

dthought
May 31st, 2007, 08:43 AM
Of note, line 16:
threshold = threshold ? treshold : 1;

should be ... ? threshold ... :)