Chapter 9: Collision Detection

Overview

What well cover in this chapter:

  • Collision detection methods

  • Built-in hitTest

  • Distance-based collision detection

  • Multiple-object collision detection strategies

  • Important formulas in this chapter

As youve progressed through the book to this point, youve seen how to make objects move and make them interact with the space they occupy. Now, youre 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, Ill attempt to cover just about everything you need to know about detecting collisions. This includes hit testing between two movie clips, hit testing between a movie clip and a point, distance-based collision detection, and multiple-object collision testing strategies. First, lets see what options are available for collision detection.



Foundation ActionScript. Animation. Making Things Move
Foundation Actionscript 3.0 Animation: Making Things Move!
ISBN: 1590597915
EAN: 2147483647
Year: 2005
Pages: 137
Authors: Keith Peters

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net