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
Rally Audio ManagerRally Camera Path PlayerRally ClientRally Cut CaptureRally EnumsRally Extension HelperRally GeometryRally ManagerRecce ManagerRecce AppRecce SettingsRally Settings ManagerSnap-to-RoadTraffic Exclusion ZonesRally UtilityRally Vehicle CaptureRally Vehicle Tracker
Rally CodriverRally Mission SettingsRally PacenotePacenote GeneratorPacenote WaypointNotebook PathStructured Pacenote DataSystem PacenotesWaypoint Types

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 Extensionsgameplayrallynotebook

Pacenote Waypoint

Class representing a waypoint within a pacenote. Each pacenote has typically two waypoints: a Corner Start (CS) and Corner End (CE). Waypoints define 3D positions with normals for intersection planes

Class representing a waypoint within a pacenote. Each pacenote has typically two waypoints: a Corner Start (CS) and Corner End (CE). Waypoints define 3D positions with normals for intersection planes and radii for trigger detection.


Constructor

local PacenoteWaypoint = require('gameplay/rally/notebook/pacenoteWaypoint')
local wp = PacenoteWaypoint(pacenote, name, pos, forceId)

Public API

MethodSignatureReturnsDescription
init(pacenote, name, pos, forceId)nilInitializes with auto-detected waypoint type
setManual(pos, radius, normal)nilSets mode to "manual" with explicit geometry
setPos(newpos)nilUpdates position
setNormal(normal)nilUpdates normal (normalized if length > 0.9)
onSerialize()tableReturns {oldId, name, waypointType, pos, radius, normal}
onDeserialized(data, oldIdMap)nilRestores from saved data via setManual
colorForWpType(pn_drawMode)tableReturns color array based on waypoint type and draw mode
drawDebug(hover, text, clr, ...)nilDraws sphere + text + intersection plane
drawDebugRecce(i, noteText)nilDraws recce-mode visualization with gate posts
isCs()booleanTrue if Corner Start type
isCe()booleanTrue if Corner End type
isLockable()booleanTrue for CS and CE types
isLocked()booleanTrue if editor lock preference is on
setRoutePoint(rp)nilAssociates a dynamic route point for distance tracking
setStaticRoutePoint(rp)nilAssociates a static route point
nameWithPacenote()stringReturns "PacenoteName[CS]" or "[CE]" format

Internals

Fields

FieldTypeDefaultDescription
posvec3constructor argWorld position
normalvec3(0,1,0)Forward normal for intersection plane
radiusnumbereditor pref or rallyUtil.default_waypoint_intersect_radiusDetection/display radius
waypointTypestringauto-detectedwpTypeCornerStart or wpTypeCornerEnd
modestringnil"manual" when explicitly placed
routePointobjectnilDynamic route point for distance calculations
staticRoutePointobjectnilStatic route point reference

Auto Type Detection

On creation, calls pacenote:getNextWaypointType() which checks existing waypoints:

  • If no CS exists → wpTypeCornerStart
  • If no CE exists → wpTypeCornerEnd

Debug Drawing

Editor mode (drawDebug):

  • Sphere at position with type-based color
  • Text label with note content
  • Square prism intersection plane perpendicular to normal

Recce mode (drawDebugRecce):

  • Two vertical cylinders as "gate posts" on each side of the road
  • Horizontal crossbar connecting posts
  • Translucent drive-through plane
  • Note text floating above

Color System

Colors vary by draw mode (selected, previous, next, background):

  • CS waypoints: green variants
  • CE waypoints: blue variants
  • Uses cc (colors) module from rally utilities

How It Works

  1. Created by pacenote's pacenoteWaypoints sorted list
  2. Position and normal define an intersection plane across the road
  3. During gameplay, route points are attached for distance-to-target calculations
  4. In the editor, drawn as spheres with intersection planes
  5. In recce mode, drawn as gate-like structures the driver passes through

Usage Example

-- Create waypoints for a pacenote
local wp_cs = pacenote.pacenoteWaypoints:create('corner start', vec3(100, 200, 50))
local wp_ce = pacenote.pacenoteWaypoints:create('corner end', vec3(120, 210, 50))

-- Set normal from snaproad
local normalVec = snaproad:forwardNormalVec(snapPoint)
wp_cs:setNormal(normalVec)

-- Check type
if wp:isCs() then
  -- corner start logic
end

See Also

  • Rally Codriver - Related reference
  • Rally Mission Settings - Related reference
  • Rally Pacenote - Related reference
  • Gameplay Systems Guide - Guide

Pacenote Generator

Simplified corner detection system that generates pacenotes from driveline points. Analyzes road geometry using circle-fitting to identify direction changes, then groups consecutive nodes into corners

Notebook Path

Core class representing a rally notebook - the container for pacenotes, codrivers, and all rally authoring data. Manages saving/loading from JSON, codriver selection, audio mode, pacenote generation,

On this page

ConstructorPublic APIInternalsFieldsAuto Type DetectionDebug DrawingColor SystemHow It WorksUsage ExampleSee Also