API Referencevetech
Tech Vehicle Utilities
Module defined in `lua/vehicle/tech/techVehicleUtils.lua`. Provides low-level physical analysis of the vehicle structure.
Module defined in lua/vehicle/tech/techVehicleUtils.lua. Provides low-level physical analysis of the vehicle structure.
Exports
Functions
computeMassProperties(withoutWheels) (callable)
- Arguments:
withoutWheels(boolean): Whether to exclude wheel nodes from calculation. - Description: Computes the vehicle's total mass, Center of Gravity (COG), and inertia tensor about the COG. Returns a table with
mass,center_of_gravity, andinertia(x, y, z, xy, xz, yz).
getRefNodes() (callable)
- Description: Returns a table of the current vehicle's reference node names (ref, back, left, up, leftCorner, rightCorner).
getNodeCache() (callable)
- Description: Generates and returns a cache containing a name-to-CID map and a list of all node CIDs.
getNodeInfo(nodeCache, requestedNodesList) (callable)
- Arguments:
nodeCache(table): Cache fromgetNodeCache.requestedNodesList(table, optional): List of names or CIDs to query. - Description: Returns detailed information (name, CID, mass, absolute position) for the requested nodes.
Related
objBinding: Used to retrieve absolute node positions and masses.vGlobal: Source of raw JBeam node data.
Tech Utilities Overview
The `tech/` directory (at the top-level of `lua/vehicle/`) provides specialized utility functions for advanced vehicle analysis, often used by external research tools or the Tech sensor suite.
cdefDebugDraw Reference
Module defined in `lua/common/cdefDebugDraw.lua`. Defines FFI C definitions for debug drawing primitives (spheres, cylinders, lines, text, triangles) used by the engine's debug visualization system.