Game Development Reference
category is set. In other words, you're assigning the plunger's shape to be in the
Plunger collision bit category. With the Mask check box, you then set which other
categories this shape is allowed to collide with with. In the case of the plunger, you
should set only the Mask check box for the Ball category, allowing the plunger to
collide with the ball. Figure 13-5 shows the correct settings for the Plunger collision
category and mask flags.
Figure 13-5 . Collision parameters for the plunger
Note So far, the plunger would collide with the ball, but the ball wouldn't col-
lide with the plunger. Keep in mind that defining collisions is a two-way pro-
cess, and in this case you still have to put the ball in the Ball category and
check the ball's Mask bit that corresponds with the Plunger category to have
both ball and plunger collide with each other.