RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Editor AI TestsEditor AI VisualizationEditor – Assembly Spline ToolAsset BrowserAsset DeduplicatorAsset Management ToolSFX Previewer (Audio Events List)Audio Ribbon EditorAutoSaveBarriers EditorBiome ToolBuilding EditorBulk RenameCamera BookmarksCamera TransformCamera Path EditorCEF HelperCo-Simulation Signal EditorCrawl Data EditorCreate Object ToolDataBlock EditorDecal EditorDecal Spline EditorDocumentation HelperDrag Race EditorDrift Data EditorDrive Path EditorDynamic Decals Tool (Vehicle Livery Creator)Engine Audio DebugExtensions DebugExtensions EditorFFI Pointer Leak TestFile DialogFlowgraph EditorForest EditorForest ViewEditor Gizmo HelperEditor Ground Model Debug HelperEditor Headless Editor TestEditor Icon OverviewEditor ImGui C DemoEditor InspectorEditor Layout ManagerEditor Level SettingsEditor Level ValidatorEditor LoggerEditor Log HelperEditor MainEditor Main MenuEditor Main ToolbarEditor Main UpdateMap Sensor EditorMaster Spline EditorMaterial EditorMeasures Inspector HeaderMesh Editor (Base)Mesh Road EditorMesh Spline EditorMission EditorMission PlaybookMission Start Position EditorMulti Spawn Manager (Vehicle Groups)Navigation Mesh EditorEditor News MessageObject Tool (Object Select Edit Mode)Object To Spline EditorParticle EditorPerformance Profiler / Camera RecorderPhysics ReloaderPrefab Instance EditorEditor PreferencesRace / Path EditorRally EditorRaycast Test Editor ToolRenderer Components Editor ToolRender Test Editor ToolResource Checker Editor ToolRiver EditorRoad Architect EditorRoad DecorationsRoad Editor (Decal Road)Road Network ExporterRoad River Cache HandlerRoad River GUIRoad Spline EditorRoad Template EditorRoad UtilitiesScene TreeScene ViewScreenshot Creator BootstrapScript AI EditorScript AI ManagerSensor Configuration EditorSensor DebuggerShape EditorShortcut LegendSidewalk Spline EditorSites EditorSlot Traffic EditorSuspension Audio DebugTech Server ManagerTerraform ToolTerrain And Road ImporterTerrain EditorTerrain Materials EditorText EditorTool ManagerTool ShortcutsTraffic DebugTraffic ManagerTraffic Signals EditorUndo History ViewerVehicle Bridge TestVehicle Detail ViewerVehicle Editor MainEditor - VisualizationEditor Viz HelperEditor Water Object HelperEditor Windows Manager
Crawl Editor - BoundariesCrawl Editor InputCrawl Editor Mission Port ToolCrawl Editor PathsCrawl Editor PresetsCrawl Editor Starting PositionsCrawl Editor TrailsCrawl Editor Waypoints

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 ExtensionseditorcrawlEditor

Crawl Editor Input

Mouse input handling for the Crawl Editor. Provides raycasting from the camera through the mouse cursor, tracking click/hold/release states with world-space hit positions.

Mouse input handling for the Crawl Editor. Provides raycasting from the camera through the mouse cursor, tracking click/hold/release states with world-space hit positions.


Public API

FunctionReturnsDescription
M.getMouseInfo()table/nilReturns the current mouse info table (pos, normals, click state)
M.updateMouseInfo()voidUpdates mouse raycast and click states for the current frame

Mouse Info Table Fields

FieldTypeDescription
camPosvec3Camera position at time of raycast
rayrayRaw camera-mouse ray
rayDirvec3Normalized ray direction
rayCasttable/nilRaycast hit result (pos, normal)
validbooleanWhether the raycast hit anything
downbooleanMouse just clicked this frame (not over ImGui)
holdbooleanMouse held down (not over ImGui)
upbooleanMouse just released (not over ImGui)
_downPosvec3World position where mouse was pressed
_downNormalvec3Surface normal where mouse was pressed
_holdPosvec3World position during hold
_upPosvec3World position where mouse was released

Usage Example

local input = require('editor/crawlEditor/input')

-- Call each frame
input.updateMouseInfo()
local mi = input.getMouseInfo()
if mi and mi.valid and mi.down then
  log('I', '', 'Clicked at: ' .. tostring(mi._downPos))
end

Notes

  • Temporarily disables forest collision during raycast to avoid hitting trees
  • Uses im.IsMouseClicked(0) and im.GetIO().WantCaptureMouse to avoid conflicts with ImGui
  • down and hold are mutually exclusive: on the click frame, only down is true

See Also

  • Crawl Editor - Boundaries - Related reference
  • Crawl Editor Mission Port Tool - Related reference
  • Crawl Editor Paths - Related reference
  • World Editor Guide - Guide

Crawl Editor - Boundaries

Sub-module of the Crawl Data Editor handling boundary polygon creation and editing. Provides vertex manipulation with gizmo support, terrain snapping, and undo/redo history.

Crawl Editor Mission Port Tool

Converts old crawl mission data (bounds.sites.json + race.race.json) into the new modular crawl system (boundary, path, starting position, trail files).

On this page

Public APIMouse Info Table FieldsUsage ExampleNotesSee Also