Theme
Field of view
The engine computes the fov from the active camera behaviour and writes it into the camera manager every frame, so an override is a value the engine keeps being handed rather than a field written once. A value under 0.5 rad is a zoom optic - scopes and binoculars compute far below the 0.78 to 0.83 gameplay range - and those keep their own fov by default.
| Export | Summary |
|---|---|
ShFovEngine | The engine's own fov of the last frame, radians, before any replacement - 0 until the engine has run the site once. |
ShFovPin | With the pin set, the override replaces the engine's value whatever it is, the zoom optics included - which is what "no zoom on ads" needs on the frames an aim would otherwise narrow the view. |
ShFovEngine
c
SH_API float ShFovEngine(void);The engine's own fov of the last frame, radians, before any replacement - 0 until the engine has run the site once. A plugin uses it to tell a narrowed aim (a mild zoom, still inside the gameplay range) apart from a magnified optic, which computes far below it.
scripthook.h, line 2162
ShFovPin
c
SH_API void ShFovPin(int on);With the pin set, the override replaces the engine's value whatever it is, the zoom optics included - which is what "no zoom on ads" needs on the frames an aim would otherwise narrow the view. It stays set until cleared, and releasing SH_CAM_FOV clears it with the rest.
scripthook.h, line 2169