Collition detection on actionscript! urgent!!

Started by
2 comments, last by m4gnus 18 years, 9 months ago
Hi everybody, I am developing a game for a cuban, here is the link http://www.miviro.com/cg/ it's almost finish, what he whants now is that the cars don't overlap... My collition detection only works for the spot of the movie clip of each one, but i want that the whole car be detected, afeter that, how can i program it so they don't overlap?? thank you so much guys!! cheers
Advertisement
The game is fun! Congrats! :)

Maybe you can have a boudning box around the cars. Finding AABB (axis aligned bouding box) colision is really simple. Moreover, creating an algorithm that will disallow you to put 2 cars at the same place should not be very complex.

Of course, I don't know ActionScript at all, and therefore I con't tell you whether you'll be able to implement this or not...

Regards,
Oh great Emmanuel, thank you a lot, i didn't know it was so great!!

Yeah i thought in the same, but i don't know how to apply it, i think i will keep google it

thank you again1!

yayo
http://www.newgameprojects.net
yayo@newgameprojects.net
as much as i remember correctly flash has AABB collision on movieclips built-in...just use mc1.hitTest(mc2); that should work...

regards,
m4gnus
"There are 10 types of people in the world... those who understand binary and those who don't."

This topic is closed to new replies.

Advertisement