What happens when two sprites collide? That’s what this chapter is all about: collision detection. You’re going to learn how to determine if two sprites are touching, and make them react in interesting ways when they do. For 2D games, there are four essential collision detection techniques you need to know, and we’re going to cover all of them in this chapter:
- Point vs. Shape: When a point intersects a shape
- Circle vs. Circle: When two circles intersect
- Rectangle vs. Rectangle: When two rectangles intersect
- Circle vs. Rectangle: When a rectangle and a circle intersect
With ...