RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Gameplay AchievementGameplay CityDiscoverForce FieldGarage ModeMarker InteractionParking SystemGameplay Playmode MarkersGameplay PoliceGameplay RallyGameplay Rally LoopGameplay Raw POIsGameplay Skidpad TestSpeed Trap LeaderboardsSpeed Traps and CamerasGameplay StatisticsTaxi Ride SystemTraffic SystemVehicle PerformanceWalking
Big Map MarkerCrawl MarkerDrift Line MarkerGas Station MarkerInspect Vehicle MarkerInvisible MarkerInvisible TriggerMission MarkerParking MarkerWalking MarkerZone Marker

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 Extensionsgameplaymarkers

Invisible Trigger

Invisible sphere-based trigger marker. Has no visual representation but detects when the player vehicle enters or exits a radius, firing `onEnter` and `onInside` callbacks. Used for gameplay triggers

Invisible sphere-based trigger marker. Has no visual representation but detects when the player vehicle enters or exits a radius, firing onEnter and onInside callbacks. Used for gameplay triggers without visible markers.


Class Methods

MethodSignatureDescription
C:init()No-op
C:setup(cluster)Stores position, radius, and onEnter/onInside callbacks
C:update(data)Debug-only (commented out sphere/distance drawing)
C:interactInPlayMode(interactData, elements)No-op
C:interactWhileMoving(interactData)Checks squared distance; fires callbacks on enter/inside/exit
C:createObjects()No-op
C:setHidden(value)No-op
C:show()No-op
C:hide()Resets _inside to false
C:clearObjects()No-op

Module Functions

FunctionSignatureReturnsDescription
create(...)markerCreates a new invisible trigger instance
cluster(pois, allClusters)nilOne cluster per POI (no grouping)

Internals

Trigger Detection

Runs in interactWhileMoving (called every frame while driving, not just at parking speed):

if vehPos:squaredDistance(self.pos) <= self.radius * self.radius then
  if not self._inside then
    self.onEnter(interactData)    -- fires once on entry
  end
  self.onInside(interactData)     -- fires every frame while inside
  self._inside = true
else
  if self._inside then
    self.onExit(interactData)     -- fires once on exit (only via hide())
  end
  self._inside = false
end
  • Walking mode is excluded (if interactData.isWalking then return end)
  • onEnter fires once when transitioning from outside to inside
  • onInside fires every frame while the vehicle is within radius
  • Exit is detected when distance exceeds radius

Cluster Data

{
  id = 'invisibleTrigger#'..poi.id,
  pos = vec3,
  radius = number,
  onEnter = function(interactData),
  onInside = function(interactData),
  visibilityPos = pos,
  visibilityRadius = 0,
}

How It Works

  1. POI system defines trigger positions with radius and callback functions
  2. Each frame while driving: squared-distance check against radius
  3. State transitions fire onEnter (once) or track onInside (continuous)
  4. No visual rendering - purely logic-driven

See Also

  • Big Map Marker - Related reference
  • Crawl Marker - Related reference
  • Drift Line Marker - Related reference
  • Gameplay Systems Guide - Guide

Invisible Marker

Minimal no-op marker class. Has no visual representation or interaction behavior. Used as a placeholder or base marker when no visual or interaction is needed.

Mission Marker

Primary marker class for mission POIs. Renders floating icons with distance-based height, ground decals (dot + ring), line-of-sight alpha fading, and OBB-based player area detection. Supports smart cl

On this page

Class MethodsModule FunctionsInternalsTrigger DetectionCluster DataHow It WorksSee Also