What we'll cover in this chapter:

  • Collision detection methods

  • Built-in hit testing methods

  • Distance-based collision detection

  • Multiple-object collision detection strategies

  • Important formulas in this chapter

As you've progressed through the book to this point, you've seen how to make objects move and make them interact with the space they occupy. Now, you're going to delve into making these objects interact with each other. For the most part, this will involve determining when two objects have touched each other. This is a subject known as collision detection or hit testing.

In this chapter, I'll attempt to cover just about everything you need to know about detecting collisions. This includes hit testing between two sprites, ...

Get Foundation ActionScript 3.0 Animation: Making Things Move! now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.