API ReferenceGE Extensionsflowgraphnodesscenecamera
Return Camera to Vehicle (Flowgraph Node)
- **Node Name:** `Return camera to vehicle`
Overview
- Node Name:
Return camera to vehicle - Category:
once_instant - File:
extensions/flowgraph/nodes/scene/camera/returnToVehicle.lua
Returns the camera from free camera or other modes back to following the active player vehicle.
Pin Schema
No input or output pins beyond the default flow pins.
Behavior
workOnce()- Checks if a player vehicle exists viagetPlayerVehicle(0):- If a vehicle exists: calls
commands.setGameCamera()to return to the vehicle camera. - If no vehicle: logs a warning (
'No active vehicle to return camera to!').
- If a vehicle exists: calls
Key Dependencies
getPlayerVehicle(0)- Returns the player's current vehicle object (or nil)commands.setGameCamera()- Switches camera back to the game/vehicle camera
How It Works
This node is typically used at the end of a cinematic sequence or free camera exploration to snap the camera back to the player's vehicle. It's a safety-checked one-shot action that warns if no vehicle is available.
Example Usage
-- Place at the end of a camera path sequence to return control
-- Wire after a Stop Cam Path node to cleanly exit cinematics
-- Also useful after any free camera manipulation nodesSee Also
- Camera Transform (Flowgraph Node) - Related reference
- Camera Look at Position (Flowgraph Node) - Related reference
- Camera Auto Circle (Flowgraph Node) - Related reference
- FlowGraph Guide - Guide