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

Flip Upright

- **Node Name:** `Flip Upright`

Overview

  • Node Name: Flip Upright
  • Category: repeat_instant
  • File: extensions/flowgraph/nodes/vehicle/flipUpright.lua

Flips a vehicle upright without repairing it. Uses spawn.safeTeleport with the vehicle's current position and a corrected rotation derived from its direction vector.

Pin Schema

Input Pins

PinTypeDescription
vehIdnumberID of the vehicle to flip. If not provided, uses the player vehicle

Internals

Key Methods

MethodDescription
work()Calls resetVehicle() and forwards flow
resetVehicle()Resolves the vehicle, teleports it upright at its current position, fires onVehicleFlippedUpright hook

How It Works

  1. The node resolves the vehicle from vehId or defaults to getPlayerVehicle(0).
  2. It calls spawn.safeTeleport(veh, veh:getPosition(), quatFromDir(veh:getDirectionVector()), nil, nil, nil, nil, false).
    • The position stays the same (current location).
    • The rotation is rebuilt from the vehicle's forward direction vector, forcing it upright.
    • The last false parameter means the vehicle is not repaired.
  3. Fires extensions.hook('onVehicleFlippedUpright', veh:getID()) so other systems can react.

Usage Example

-- In a flowgraph:
-- [Flip Condition] → [Flip Upright] ← vehId ← [Vehicle ID]

-- Programmatic equivalent:
local veh = getPlayerVehicle(0)
if veh then
  spawn.safeTeleport(veh, veh:getPosition(), quatFromDir(veh:getDirectionVector()), nil, nil, nil, nil, false)
  extensions.hook('onVehicleFlippedUpright', veh:getID())
end

Key Dependencies

  • spawn.safeTeleport() - teleports a vehicle safely to a position/rotation
  • quatFromDir() - creates an upright quaternion from a direction vector
  • onVehicleFlippedUpright hook - notifies other systems of the flip

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

Enter Vehicle

- **Node Name:** `Enter Vehicle`

Freeze Vehicle

- **Node Name:** `Freeze Vehicle`

On this page

OverviewPin SchemaInput PinsInternalsKey MethodsHow It WorksUsage ExampleKey DependenciesSee Also