O'Reilly logo

3D Game Programming for Teens, Second Edition by Eric Grebler, Maneesh Sethi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Changing the Size of a Terrain

We’ll use the ScaleEntity command to change the size of a terrain. In the example we’ve been using, we’ll scale the terrain by 15 times on the y axis and 10 times on the x and z axes by adding the following code (in bold):

; Creating the terrain
ground=CreateTerrain(512)
PositionEntity ground, -500,0,-500
ScaleEntity ground, 10,15,10

Using the ScaleEntity command, you can increase or decrease the size of your playing field.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required