RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Flowgraph Base ModuleFlowgraph Base NodeFlowgraph Base State NodeFlowgraph Node BuilderFlowgraph GraphFlowgraph Group HelperFlowgraph LinkFlowgraph ManagerNew Node TemplateFlowgraph PinFlowgraph States ManagerFlowgraph UtilsFlowgraph Variable Storage
AI Debug DisplayCamera Mouse RaycastCommentDebug CylinderDebug LineDebug PrismDebug SphereDebug TextDisplay ValueDisplay FlowMulti GraphFlow ButtonLogMini GraphMulti FlowNumber SliderPause ExecutionRestart ProjectStop ProjectCategory Test (Test Dynamic)

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 Extensionsflowgraphnodesdebug

Camera Mouse Raycast

- **Name:** `Camera Mouse Raycast`

Overview

  • Name: Camera Mouse Raycast
  • Category: repeat_instant
  • File: lua/ge/extensions/flowgraph/nodes/debug/cameraMouseRayCast.lua
  • Pattern: Class-based (C = {}, returns _flowgraph_createNode(C))

Description

Fires a raycast from the camera to the mouse cursor position each frame. Outputs hit information including the object, position, normal, and click state. May be superseded by the mouse tool node.

Pin Schema

Output Pins

PinTypeDescription
clickingflow (impulse)Fires if mouse is clicked (left button, not captured by ImGui)
holdflowActive while mouse is held down
objIDnumberID of the hit object
objNamestringName of the hit object
distancenumber (hidden)Distance to the hit point
posvec3 (hidden)World position of the hit
normalvec3 (hidden)Surface normal at the hit
facenumber (hidden)Face index of the hit

Behavior

  • work() calls cameraMouseRayCast(). If a hit is found, populates all output pins with hit data. Click detection uses im.IsMouseClicked(0) filtered by !im.GetIO().WantCaptureMouse.
  • If no hit, all data pins are set to nil and flow pins to false.

Key APIs Used

  • cameraMouseRayCast()
  • ui_imgui.IsMouseClicked(), ui_imgui.IsMouseDown(), ui_imgui.GetIO()

Tags

#flowgraph #node #ge #debug #raycast #mouse


Additional Exports

  • name - string - (see source)

  • color - any - (see source)

  • icon - any - (see source)

  • description - string - (see source)

  • category - string - (see source)

  • todo - string - (see source)

  • pinSchema - table - (see source)

  • tags - table - (see source)


See Also

  • AI Debug Display - Related reference
  • Comment - Related reference
  • Debug Cylinder - Related reference
  • FlowGraph Guide - Guide

AI Debug Display

- **Name:** `AI Debug Display`

Comment

- **Name:** `Comment`

On this page

OverviewDescriptionPin SchemaOutput PinsBehaviorKey APIs UsedTagsAdditional ExportsSee Also