RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Auto AnnotationBoosterCalibrate ESCCompile ImpostersCompile MeshesConfig List GeneratorDecal Roads EditorDependency TreeDoc CreatorVehicle ExporterFollow The White RabbitForest GeneratorGround Model DebugInput System UtilsInstanced Line Render DemoJBeam StatsLog StreamsMap TilesNode Beam ExportNode StreamPhotomodePrecompile ShadersPrecompile VehiclesProcedural Track GeneratorRectangle GeneratorRender Components APIResave MaterialsRich PresenceSave Dynamic DataScreenshot CreatorShowroomSort LinesStep HandlerTerrain GeneratorTest Extension ProxiesTest JSON Files SyntaxVehicle Rope DebugBatch WorkerWebSocket Test
Basic BordersBasic CentersBorder Wall MeshCamera TransitionCeiling MeshTrack MarkersMaterial UtilTrack MeshesMulti Track MergerObstacle PlacerTrack PiecesProcedural PrimitivesQuickrace SetupSegment To Procedural MeshSpline Track

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceGE ExtensionsutiltrackBuilder

Border Wall Mesh

Generates vertical wall meshes for left and right track borders with configurable height.

Generates vertical wall meshes for left and right track borders with configurable height.


Overview

util_trackBuilder_borderWallMesh creates box-shaped wall geometry that extends vertically from the track edges. Each wall has four sides (inner, outer, top, bottom) and supports per-point variable height via leftWallHeight / rightWallHeight fields on track points.

Module path: lua/ge/extensions/util/trackBuilder/borderWallMesh.lua


Exports (M)

FunctionSignatureDescription
getMeshes(segment) → tableReturns wall mesh data for active left/right walls.

Internals

Wall Geometry

Each wall cross-section has 4 vertices per track point:

  1. Base at track edge (width offset, below surface).
  2. Base at track edge + 1 unit outward (below surface).
  3. Top at track edge + 1 unit outward (at wall height).
  4. Top at track edge (at wall height).

The wall height comes from point.leftWallHeight or point.rightWallHeight.

Face Layout

The precomputed shape.faceInfo defines 24 face vertices per segment pair (4 quads × 2 triangles × 3 vertices), covering all four wall sides.

Start/End Caps

Wall caps use dedicated front/back face definitions that differ for left and right walls (winding order is mirrored). Controlled by segment.meshInfo.leftWall.startCap/endCap.

UV Mapping

  • U: Fixed values (0, 0.125, -0.2, or height-based) per wall vertex.
  • V: point.uvY * uvHeight for along-track tiling.

Normals

Four normals per point: down (-nz), outward (±nx), up (nz), inward (∓nx).

Quality Gate

Returns empty at quality level 4.

Activation

Walls are only generated when segment.meshInfo.leftWall.active or segment.meshInfo.rightWall.active is true.


How It Works

  1. Track builder marks walls as active and sets height per point.
  2. getMeshes(segment) compiles left and/or right wall meshes.
  3. Wall vertices follow the track width and orientation.

Lua Examples

-- Used internally by track builder:
local wallMeshes = extensions.util_trackBuilder_borderWallMesh.getMeshes(segment)
-- Returns: {leftWallMesh or nil, rightWallMesh or nil}

Additional Exports

  • M.getMeshes - (undocumented)

See Also

  • Track Builder - Basic Borders - Related reference
  • Track Builder - Basic Centers - Related reference
  • Track Builder - Camera Transition - Related reference
  • Game Engine Overview - Guide

Basic Centers

Generates center road surface mesh geometry for track segments in the track builder system.

Camera Transition

Smoothly lerps the free camera from its current position/rotation to a target over a specified duration.

On this page

OverviewExports (M)InternalsWall GeometryFace LayoutStart/End CapsUV MappingNormalsQuality GateActivationHow It WorksLua ExamplesAdditional ExportsSee Also