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

Move Vehicle To

- **Node Name:** `Move Vehicle To`

Overview

  • Node Name: Move Vehicle To
  • Category: repeat_instant
  • File: extensions/flowgraph/nodes/vehicle/moveTo.lua

Moves a vehicle to a predefined position and rotation. Supports both direct teleport (with repair) and safe teleport (finds a good spot automatically). Can optionally move without repairing the vehicle.

Pin Schema

Input Pins

PinTypeDescription
vehIdnumberID of the vehicle to move. Defaults to player vehicle
posvec3Target position
rotquatTarget rotation
safeTeleportbool(hidden) Use safe teleport to find a good spot automatically
repairVehiclebool(hidden, hardcoded) Whether to repair the vehicle when moved. Default: true

Legacy Pins

Old NameNew Name
vehIDvehId

Internals

Key Methods

MethodDescription
work()Calls resetVehicle() every frame
resetVehicle()Resolves the vehicle, validates position/rotation, and teleports with the appropriate method

Teleport Modes

repairVehiclesafeTeleportMethod Used
true (default)falsevehicleSetPositionRotation() - direct teleport with repair
truetruespawn.safeTeleport(veh, pos, rot) - safe teleport with repair
false-spawn.safeTeleport(veh, pos, rot, ..., false) - safe teleport without repair

Rotation Correction

When using safeTeleport, the rotation is corrected: quat(rot) * quat(0,0,-1,0) to align the vehicle's forward direction properly.

How It Works

  1. Resolves the vehicle from vehId or defaults to getPlayerVehicle(0).
  2. Validates that pos is a 3-element array. Falls back to {0,0,0,0} for rotation if not provided.
  3. Depending on repairVehicle and safeTeleport flags:
    • Default (repair, no safe teleport): Uses vehicleSetPositionRotation(id, x, y, z, rx, ry, rz, rw) - vehicle is repaired.
    • Repair + safe teleport: Uses spawn.safeTeleport(veh, vec3(pos), quat(correctedRot)).
    • No repair: Uses spawn.safeTeleport with the last parameter false to skip repair.
  4. Fires appropriate hooks: trackVehReset when repaired, onVehicleFlippedUpright when moved without repair.

Usage Example

-- In a flowgraph:
-- [Position Provider] → pos → [Move Vehicle To] ← vehId ← [Vehicle ID]
-- [Rotation Provider] → rot →

-- Programmatic equivalent (with repair):
vehicleSetPositionRotation(vehId, x, y, z, rx, ry, rz, rw)
extensions.hook('trackVehReset')

-- Without repair:
local correctedRot = quat(rot) * quat(0,0,-1,0)
spawn.safeTeleport(veh, vec3(pos), quat(correctedRot), nil, nil, nil, nil, false)
extensions.hook('onVehicleFlippedUpright', veh:getID())

Key Dependencies

  • vehicleSetPositionRotation() - engine function for direct teleport with repair
  • spawn.safeTeleport() - finds a safe position and teleports the vehicle
  • trackVehReset hook - fired when a vehicle is reset/repaired (used for DNF penalties)
  • onVehicleFlippedUpright hook - fired when a vehicle is moved without repair

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

Keep Vehicle

- **Node Name:** `Keep Vehicle`

On Cannon Fired

- **Node Name:** `on Cannon Fired`

On this page

OverviewPin SchemaInput PinsLegacy PinsInternalsKey MethodsTeleport ModesRotation CorrectionHow It WorksUsage ExampleKey DependenciesSee Also