Skip to content

HeadLight (in ModelAttachments)

Overview

The <HeadLight> section within <ModelAttachments> describes light rays simulation and a flare of the headlights.

TIP: For general definitions of "Flare", "Model" and "Light" lights, see <ModelAttachments>. For details on them, see <Flare>, <Model>, and <Light>.

Particularly, in this <HeadLight> section:

  • The light rays simulation of the headlights is described by a set of <Model> tags.
  • The flares of the headlights is described by a set of <Flare> tags.

These tags are used here the same way they are used in the <StopSignals> section.

NOTE: Headlights are turned on when the player presses the corresponding button in the game. In the case of the Keyboard, L is the default button for enabling Headlights.

Two <HeadLight> tags

The light of headlights is described in the XML model of the truck in the two different places:

  • The <HeadLight> tag in the <Truck> section – describes the main light of the headlights is described. See this <HeadLight> tag for details.

  • The <HeadLight> tag in the <ModelAttachments> section – describes the light rays simulation of the headlights and flares of the headlights, see above.

Influence of Terrain Blocks

The light specified by <HeadLight> tag in the <ModelAttachments> section is clipped based on terrain blocks:

clipping of light based on terrain blocks

The light specified by the <HeadLight> tag in the <Truck> section is not clipped this way. Terrain blocks do not affect it. See this <HeadLight> tag for details.