Next: , Previous: Tracks, Up: Top


1.8 Worlds

The “world” specifies various environmental factors. Here's the entire default world file.

     <world name="Earth">
       <!-- Acceleration due to gravity -->
       <gravity>9.8</gravity>
     
       <maximum-time-step>0.01</maximum-time-step>
     
       <atmosphere>
         <!-- Air density -->
     	<density>1.2</density>
     	<!-- Wind velocity -->
         <velocity>[ 0.0, 0.0, 0.0 ]</velocity>
       </atmosphere>
     
       <lighting>
         <!-- Direction to the light source -->
         <source-position>[ 0.0, -1.0, 1.0 ]</source-position>
     	<!-- RGB for ambient light -->
     	<ambient>[ 0.7 , 0.7, 0.7 ]</ambient>
       </lighting>
     </world>

Here is a description of the sections.

gravity
Acceleration due to gravity. The typical value for Earth is 9.8 m/s^2.
maximum-time-step
Each frame in the simulation will be sub-divided into time steps no larger than this value. If you see jitter when the car is stopped, try lowering the maximum time step. However, you may take a performance hit, if the value is too small.
atmosphere
Density of the air and wind velocity.
lighting
Light source position and ambient light level.

Other world files can be specified with the --world= or -w options. Just for fun, a world file for the moon is provided.