API ReferenceGE Extensionsflowgraphnodesscenecamera
Set Camera FOV (Flowgraph Node)
- **Node Name:** `Set Camera FOV`
Overview
- Node Name:
Set Camera FOV - Category:
repeat_instant - File:
extensions/flowgraph/nodes/scene/camera/setCameraFOV.lua
Sets the camera's Field of View (FOV) to a specified angle. Automatically switches to free camera mode. Restores the original FOV when execution stops.
Pin Schema
Input Pins
| Pin | Type | Description |
|---|---|---|
value | number | The FOV angle to set |
Behavior
work()- Each frame:- Switches to free camera if not already active.
- Sets the FOV via
core_camera.setFOV(0, value).
_executionStarted()- Stores the current FOV inself._storedFovfor later restoration._executionStopped()- Restores the original FOV fromself._storedFov, then clears it.drawMiddle()- Displays the current FOV value in the node editor.
Key Dependencies
commands.isFreeCamera()/commands.setFreeCamera()- Free camera managementcore_camera.getFovDeg()- Read current FOVcore_camera.setFOV(playerIndex, fovDeg)- Set FOV in degrees
How It Works
The node saves the original FOV when the flowgraph starts and restores it when execution ends - ensuring cinematic FOV changes don't permanently alter the player's view. During execution, it continuously applies the target FOV every frame.
Example Usage
-- Cinematic zoom: wire a number provider to gradually change FOV
-- e.g., start at 60° and interpolate down to 30° for a zoom effect
-- FOV automatically restores when the flowgraph stopsSee 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