Game Development Reference
In-Depth Information
Adding obstacles to Fame
Next, let's add an obstacle inbetween the ships and their target. Increase the size of
the ground plane by increasing its X scale. Then, add a cylinder to the middle of the
scene to be an obstacle for the ships. To have this obstacle recognized by Fame,
add the Fame obstacle script, FameObstacle.cs , to it. Fame allows two types of
obstacles: round (circles) and 2D polygons. You specify the polygon ones, the same
as we did for group shapes, by modifying control points. For our obstacle, we just
need it to match the radius of the cylinder. In this example, the cylinder has a scale
of 50 , which makes its radius 25, so set the obstacle's radius to 25 .
The demo should now look like the following screenshot:
Search WWH ::




Custom Search