Jump to content
  • Advertisement
Sign in to follow this  
yayo_99

Collition detection on actionscript! urgent!!

This topic is 4776 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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,

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
as much as i remember correctly flash has AABB collision on movieclips built-in...just use mc1.hitTest(mc2); that should work...

regards,
m4gnus

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!