Game Development Reference
In-Depth Information
This method not only mimics human vision-making objects in the distance
less defined, but also allows for the drawing of more objects in a scene as the
ones farther away take up less memory.
Unity Hands On
A Simple LOD Handler
Step 1. Download Chapter Two/ from the Web site, unzip,
and open in Unity. In the Project, double-click on lodbuilding of the
Scenes folder to open the scene. The Scene will appear with a high-rise
building and FPC.
Step 2. Play. Move around using the FPC controls.
Step 3. While playing, in the Game, click on the Stats button at the
top right of the Game tab as shown in Figure 2.40 . A window with
game statistics will display as an overlay. In this window you can
see how fast the application is running and how many triangles
(a.k.a. polygons) are in the camera view.
Fig 2.40 The Stats button in the
Game tab displays current game
performance values.
Step 4. Stop playing and create a new JavaScript file called
LODManager . Add the code shown in Listing 2.20 .
Search Nedrilad ::

Custom Search