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
Align For CouplingApply Velocity to VehicleBoost VehicleSet Vehicle ColorsCustom Parts Config ProviderEnter VehicleFlip UprightFreeze VehicleGenerate License PlateGet Vehicle ActiveGet Electrics ValueGet GearboxmodeGet Powertrain DataGravity ForceDistance From GroundHas Coupler TagIs CoupledIs Player UsableKeep VehicleMove Vehicle ToOn Cannon FiredOn Vehicle DestroyedOn Vehicle ResetOn Vehicle SpawnedOn Vehicle SwitchedPlayer UsableRandom Config ProviderRecover In PlaceRemove VehicleTimeline ReplaySet Vehicle ActiveSet Gearbox ModeSet IgnitionSet License PlateSet LightbarSet LightsShift to Gear IndexSpawn VehicleVehicle StatesTeleport To Last RoadToggle Vehicle ControlsMove To ShowroomVehicle TouchProps TouchStatic Object TouchTrack VehicleTrailer Respawn ControlVehicle Config ProviderGet Vehicle DataGet Vehicle DataGet Vehicle BoundsVehicle PingGet Vehicle Wheel Center

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 Extensionsflowgraphnodesvehicle

Recover In Place

- **Node Name:** `Recover In Place`

Overview

  • Node Name: Recover In Place
  • Category: once_instant
  • File: extensions/flowgraph/nodes/vehicle/recoverInPlace.lua

Recovers a vehicle in place - resets broken flex mesh and safely teleports the vehicle to its current position. The vehicle may be slightly repositioned to avoid intersecting obstacles.

Pin Schema

Input Pins

PinTypeDescription
vehIdnumberID of vehicle to recover. If empty, uses player vehicle

Legacy Pin Mapping

  • in.vehID → vehId

Internals

Key Methods

MethodDescription
init()Empty initialization
workOnce()Finds vehicle, resets broken flex mesh, and safe-teleports to current position

How It Works

  1. Looks up the vehicle by vehId or falls back to the player vehicle (getPlayerVehicle(0)).
  2. Calls veh:resetBrokenFlexMesh() to repair any deformed mesh.
  3. Calls spawn.safeTeleport() with the vehicle's current position and orientation.
  4. safeTeleport adjusts the position slightly to avoid clipping into terrain/objects.

Usage Example

-- In a flowgraph - recover vehicle after a crash:
-- [Get Player Vehicle] → (vehId) → [Recover In Place]

-- Direct Lua equivalent:
local veh = getPlayerVehicle(0)
if veh then
  veh:resetBrokenFlexMesh()
  spawn.safeTeleport(veh, veh:getPosition(),
    quatFromDir(veh:getDirectionVector(), veh:getDirectionVectorUp()))
end

Key Dependencies

  • veh:resetBrokenFlexMesh() - repairs deformed vehicle mesh
  • spawn.safeTeleport(veh, pos, rot) - teleports vehicle to position while avoiding collisions
  • quatFromDir() - creates a quaternion from direction vectors

See Also

  • Align for Coupling (Flowgraph Node) - Related reference
  • Apply Velocity to Vehicle (Flowgraph Node) - Related reference
  • Boost Vehicle (Flowgraph Node) - Related reference
  • FlowGraph Guide - Guide

Random Config Provider

- **Node Name:** `Random Config Provider`

Remove Vehicle

- **Node Name:** `Remove Vehicle`

On this page

OverviewPin SchemaInput PinsLegacy Pin MappingInternalsKey MethodsHow It WorksUsage ExampleKey DependenciesSee Also