techUtils Reference
Module defined in `lua/common/tech/techUtils.lua`. Utility functions for the tech/co-simulation layer - surface height queries and table-to-vector conversions.
Module defined in lua/common/tech/techUtils.lua. Utility functions for the tech/co-simulation layer - surface height queries and table-to-vector conversions.
Exports
Functions
M.getSurfaceHeight(pos)
Query the terrain surface height at a given position.
- Parameters:
pos- vec3/table - World position to query
- Returns: number - Surface height at position
M.tableToVec3Recursive(tbl)
Recursively convert tables with x/y/z keys to vec3 objects (and 4-element tables to quats).
- Parameters:
tbl- table - Table tree to convert
- Returns: table - Same table with vec3/quat conversions applied in-place
M.migrateOldKeysRecursive(tbl)
Recursively migrate deprecated key names in data tables to current naming conventions.
- Parameters:
tbl- table - Table tree to migrate
Internal Notes
tableToVec3OrQuat(internal) detects{x, y, z}or{x, y, z, w}numeric tables- Migration handles backward compatibility for tech layer data formats
techCommunication Reference
Module defined in `lua/common/tech/techCommunication.lua`. TCP socket communication layer for BeamNG's tech/co-simulation interface. Handles client connections, MessagePack-encoded message exchange, a
testFramework/ - Unit Testing Framework
Simple unit test framework for BeamNG Lua code with JUnit XML output.