RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

server/commands - Camera & Input Commandsge_utils - Game Engine Utility Functionsmain.lua - GE Lua Entry Point & Game Loopmap.lua - Navigation Graph (AI Road Map)screenshot.lua - Screenshot Systemserver/server - Level Loading & Game ServerserverConnection - Client-Server Connection Manager`setSpawnpoint` - Default Spawn Point Persistence`simTimeAuthority` - Simulation Time & Bullet Time Control`spawn` - Vehicle Spawning & Safe Placement`suspensionFrequencyTester` - Suspension Natural Frequency Analysis
Activity ManagerAudio Bank ManagerAudio Ribbon SystemBus Route ManagerCamera SystemCore Chat (IRC)Core CheckpointsCore Command HandlerCoupler Camera ModifierDevices (RGB Peripherals)Dynamic PropsEnvironmentFlowgraph ManagerForestFun StuffGame ContextGame StateGround Marker ArrowsGround MarkersHardware InfoHighscoresHotlappingInventoryJob SystemLap TimesLevelsLoad Map CommandMetricsMod ManagerMultiseatMultiseat CameraMulti SpawnOnlinePaths (Camera Paths)Quick Access (Radial Menu)Recovery PromptRemote ControllerReplayRepositoryRope Visual TestScheme Command ServerCore SnapshotCore SoundsCore TerrainTraffic SignalsTrailer RespawnVehicle Active PoolingVehicle Bridge (GE ↔ VLua Communication)Vehicle MirrorsVehicle PaintsCore VehiclesVehicle TriggersVersion UpdateWeather SystemWindows Console
Input Action FilterInput ActionsInput BindingsInput CategoriesDeprecated ActionsVehicle SwitchingVibration DebugVirtual Input

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 Extensionscoreinput

Virtual Input

Creates and manages virtual input devices (joysticks/gamepads) from Lua. Used by the remote controller extension and other systems that need to inject synthetic input events.

Creates and manages virtual input devices (joysticks/gamepads) from Lua. Used by the remote controller extension and other systems that need to inject synthetic input events.


Public Functions

FunctionSignatureDescription
M.createDevice(productName, vidpid, axes, buttons, povs) → deviceInstance, infoRegisters a virtual input device with the engine
M.deleteDevice(deviceInstance)Unregisters and removes a virtual input device
M.getDeviceInfo(vidpid) → deviceInstance, infoLooks up a device by its VID/PID string
M.emit(deviceInstance, objType, objectInstance, action, val)Emits an input event from a virtual device

Module State

FieldTypeDescription

Usage Example

local vi = extensions.core_input_virtualInput

-- Create a virtual gamepad with 2 axes, 4 buttons, 0 POV hats
local inst, info = vi.createDevice("MyVirtualPad", "mydevice01", 2, 4, 0)

-- Emit a button press
vi.emit(inst, "button", 0, "down", 1)

-- Emit an axis change (value 0-1)
vi.emit(inst, "axis", 0, "change", 0.75)

-- Emit button release
vi.emit(inst, "button", 0, "up", 0)

-- Clean up
vi.deleteDevice(inst)

Device Naming

Virtual devices are registered with the engine as "vinput" .. deviceInstance. The engine's getVirtualInputManager() handles the low-level registration.


Event Parameters

ParameterValuesDescription
objType"button", "axis"Type of input object
objectInstancenumberZero-based index of the button/axis
action"down", "up", "change"Event action type
valnumberValue (0/1 for buttons, 0.0–1.0 for axes)

Notes

  • Timestamps use os.clockhp() for high-precision timing.
  • If getVirtualInputManager() returns nil, all operations log errors and return nil.
  • Used by core_remoteController for phone-based steering input.

See Also

  • remoteController - Phone remote control using virtual input
  • vibrationDebug - Vibration parameter tuning

Vibration Debug

ImGui debug window for tuning force-feedback vibration parameters on the player vehicle. Adjusts wheel-slip and jerk force multipliers/minimums sent to the vehicle's `hydros` system.

Settings Audio

Manages audio settings including provider selection and per-channel volume control.

On this page

Public FunctionsModule StateUsage ExampleDevice NamingEvent ParametersNotesSee Also