API ReferenceGE Extensionsflowgraphnodesvehicle Get Vehicle Bounds
- **Node Name:** `Get Vehicle Bounds`
- Node Name:
Get Vehicle Bounds
- Category:
repeat_instant
- File:
extensions/flowgraph/nodes/vehicle/vehicleOOBB.lua
Provides the four corner positions and center of a vehicle's spawn world Oriented Object Bounding Box (OOBB).
| Pin | Type | Description |
|---|
vehId | number | Vehicle ID. Falls back to player vehicle. |
| Pin | Type | Description |
|---|
corner_FR | vec3 | Front-right corner position. |
corner_FL | vec3 | Front-left corner position. |
corner_BR | vec3 | Back-right corner position. |
corner_BL | vec3 | Back-left corner position. |
center | vec3 | Center of the bounding box (average of 4 ground-level corners). |
| Method | Description |
|---|
init() | No-op. |
work() | Reads the OOBB from the vehicle and outputs corner/center positions. |
| Point Index | Corner |
|---|
| 0 | Front-Left |
| 3 | Front-Right |
| 7 | Back-Right |
| 4 | Back-Left |
- Resolves the vehicle by ID or falls back to the player vehicle.
- Gets the spawn world OOBB via
veh:getSpawnWorldOOBB().
- Reads corner positions from OOBB point indices 0, 3, 4, 7.
- Computes center as the average of the four corner positions.
- Outputs all positions as table-format vec3 values.
-- Flowgraph:
-- [Vehicle ID] → vehId → [Get Vehicle Bounds]
-- ↓ center → [Distance Check]
-- ↓ corner_FL → [Front-Left Sensor]
-- Equivalent GE Lua:
local veh = getPlayerVehicle(0)
local oobb = veh:getSpawnWorldOOBB()
local fl = oobb:getPoint(0)
local fr = oobb:getPoint(3)
local br = oobb:getPoint(7)
local bl = oobb:getPoint(4)
local center = (fl + fr + br + bl) * 0.25
veh:getSpawnWorldOOBB() - oriented object bounding box