JBeam Stage 2 Loader
Module defined in `lua/vehicle/jbeam/stage2.lua`. This is the primary interface for committing JBeam data to the C++ physics engine. In the vehicle VM, this module is exposed via the global `v`.
Module defined in lua/vehicle/jbeam/stage2.lua. This is the primary interface for committing JBeam data to the C++ physics engine. In the vehicle VM, this module is exposed via the global v.
Exports
Functions
loadVehicleStage2(vdataStage1) (callable)
-
Arguments:
vdataStage1(table): The merged JBeam data from Stage 1. -
Description: The main entry point for vehicle loading. It triggers the physics push and populates the
v.dataandv.configtables. -
Returns:
vdataStage1.vdata
Physics Commit Functions (Internal)
These functions process specific sections of the JBeam table and use obj methods to commit them to the engine.
processNodes(vehicle): Commits nodes viaobj:setNode.processBeams(vehicle): Commits beams viaobj:setBeam.processWheels(vehicle): Sets up physical wheel objects viaobj:setWheel.processTriangles(vehicle): Commits collision/aero triangles viaobj:setTriangle.processRefNodes(vehicle): Sets vehicle reference orientation viaobj:setReferenceNodes.processTorsionbars(vehicle): Commits torsion bars viaobj:setTorsionbar.processRails(vehicle)/processSlidenodes(vehicle): Handles rail and slidenode physics.
Related
vGlobal: The public interface for the data generated by this module.objBinding: The C++ interface used to push this data.
JBeam System Overview
The `jbeam/` directory contains the logic for parsing, compiling, and pushing JBeam data to the physics engine.
Automatic Gearbox
Torque-converter based automatic transmission with planetary gear sets. Simulates gear selection logic, shift scheduling, and torque multiplication for traditional automatic transmissions.