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

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 Extensionsutil

Showroom

Manages a simple showroom prefab for displaying vehicles in a clean environment.

Manages a simple showroom prefab for displaying vehicles in a clean environment.


Overview

util_showroom spawns and manages a garage prefab at a high altitude position (y=1000), providing functions to move vehicles inside and check if the camera/vehicle is within the showroom bounds.

Extension path: lua/ge/extensions/util/showroom.lua


Exports (M)

FunctionSignatureDescription
moveInside(veh)Teleports a vehicle into the showroom and autoplaces it.
isInside(pos?) → boolChecks if a position (or current player/camera) is within 20m of the showroom.
getPosRot() → pos, rotReturns the showroom center position and identity rotation.
onClientEndMission()Unloads (deletes) the showroom prefab.

Internals

Prefab

Path: art/prefabs/garage_simple.prefab
Spawned at vec3(0, 0, 1000) - high above the level to avoid collisions with terrain.

Lazy Loading

The prefab is spawned on first use (when localToWorld is called). It persists until the mission ends.

Position Check

isInside(pos) uses a simple distance check (< 20m) from the prefab origin. If no position is provided, it uses the player vehicle position or camera position.

Cleanup

onClientEndMission deletes the prefab and calls be:reloadCollision().


How It Works

  1. First call to moveInside or isInside triggers prefab spawning.
  2. moveInside(veh) teleports the vehicle to the showroom center.
  3. isInside() checks proximity to determine if the camera/vehicle is in the showroom.
  4. Prefab is cleaned up when the mission ends.

Lua Examples

local showroom = extensions.util_showroom

-- Move current vehicle into showroom
local veh = getPlayerVehicle(0)
showroom.moveInside(veh)

-- Check if player is in showroom
if showroom.isInside() then
  print("In showroom")
end

-- Get showroom position
local pos, rot = showroom.getPosRot()

Additional Exports

  • M.getPosRot - (undocumented)
  • M.isInside - (undocumented)
  • M.moveInside - (undocumented)
  • M.onClientEndMission - (undocumented)

See Also

  • Auto Annotation - Related reference
  • Booster - Related reference
  • Calibrate ESC - Related reference
  • Game Engine Overview - Guide

Screenshot Creator

M.dependencies = {"ui_imgui", "render_renderViews"}

Sort Lines

Sorts JSONL (one-JSON-per-line) files alphabetically by their `name` field, primarily used for audio definition files.

On this page

OverviewExports (M)InternalsPrefabLazy LoadingPosition CheckCleanupHow It WorksLua ExamplesAdditional ExportsSee Also