RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
`adasUltrasonic.lua``cameraPreview.lua``capturePlayer.lua``license.lua``lidarTest.lua``multiscreen.lua``openDriveExporter.lua``openStreetMapExporter.lua``partAnnotations.lua``platoonFunctions.lua``pythonExport.lua``rawLidar.lua``rawLidarEmpty.lua``sensors.lua``sumoExporter.lua``techCore.lua``terrainImporter.lua``ultrasonicTest.lua``utils.lua`

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 Extensionstech

`capturePlayer.lua`

> This Source Code Form is subject to the terms of the bCDDL, v. 1.1.

This Source Code Form is subject to the terms of the bCDDL, v. 1.1. If a copy of the bCDDL was not distributed with this file, You can obtain one at http://beamng.com/bCDDL-1.1.txt

Module variable: M

Dependencies

  • ffi ← ffi
  • captureBuffer ← string.buffer
  • pcdLib ← tech/pcdLib

Hooks

  • onInit
  • onReset

Exported Functions

M.onInit()

Line 333

M.onReset()

Line 333

M.mergeCaptures(captureName, captureType, removeIntermediates)

Line 80

M.playCapture(inputFilename, outputPrefix, dtBetweenRequests, mergeResponses, quitOnEnd)

Line 292

Exported Variables

M.dependencies

Line 45 - {'tech_techCore', 'tech_techCapture', 'core_jobsystem'}

Internal Functions

Show internal functions
  • getAttachmentFilename(name, id) (line 47)
  • parseIntermediate(file, output) (line 55)
  • mergeCaptures(captureName, captureType, removeIntermediates) (line 80)
  • compare(a, b) (line 102)
  • waitForResponse(job, request, type) (line 143)
  • syncRequest(request) (line 156)
  • syncResponse(response) (line 163)
  • processRequest(job, ctx, payload, forceWait) (line 170)
  • techCaptureJob(job, args) (line 196)
  • checkCaptureRequestFile(inputFilename) (line 274)
  • playCapture(inputFilename, outputPrefix, dtBetweenRequests, mergeResponses, quitOnEnd) (line 292)
  • onInit() (line 333)
  • saveBitmap(size, data, filename) (line 423)
  • depthToRGBA(sensorData) (line 431)
  • radarReturnsToPointcloud(sensorData) (line 514)

See Also

  • adasUltrasonic.lua - Related reference
  • cameraPreview.lua - Related reference
  • license.lua - Related reference
  • Game Engine Overview - Guide

`cameraPreview.lua`

> This Source Code Form is subject to the terms of the bCDDL, v. 1.1.

`license.lua`

> This Source Code Form is subject to the terms of the bCDDL, v. 1.1.

On this page

DependenciesHooksExported FunctionsM.onInit()M.onReset()M.mergeCaptures(captureName, captureType, removeIntermediates)M.playCapture(inputFilename, outputPrefix, dtBetweenRequests, mergeResponses, quitOnEnd)Exported VariablesM.dependenciesInternal FunctionsSee Also