Game Development Reference
In-Depth Information
Now you'll trace the shape for the table-bottom image. This requires a few addi-
tional steps because the table-bottom image actually consists of four individual,
disjointed elements that need to have individual shapes. Version 1.0.4 of PhysicsEditor
traces only contiguous shapes, so you need to open the Shape Tracer a total of four
times. Each time you open the Shape Tracer, click the part of the image you want to
trace and click OK to create the shape. A Tolerance setting of 4,0 works well for all
four shapes. You should end up with four shapes covering all the four elements of the
table-bottom image. Don't forget to set the collision bits exactly like you did for
table-top, as shown in Figure 13-7 .
Defining the Flippers
Select the flipper-left image and open the Shape Tracer. Notice that the resulting
shape initially suggested by the Shape Tracer doesn't make much sense—the shape is a
lot larger than the image would suggest.
That's because the image has glow and shadow effects that create an aura around the
shape itself and that's nearly invisible on a light background. To enable the Shape
Tracer to create a better shape, adjust the Alpha threshold setting. The default value is
0, which means that all pixels that are not entirely transparent will be considered when
the shape is traced. In this case, you want to consider only the fully opaque pixels for
the shape. If you set the Alpha threshold to 254, as in Figure 13-8 , you get a much bet-
ter result.
 
Search Nedrilad ::




Custom Search