Skip to main content

camera.get_fov_preference

Overview

  • Returns the user's camera field-of-view PREFERENCE in degrees, plus the range it accepts. fov_deg is the VERTICAL angle, because inZOI pins AspectRatioAxisConstraint=AspectRatio_MaintainYFOV. fov_ratio is the same preference in the 0-1 form the option system stores, which is what camera.get_settings reports under its fov key. This is the PREFERENCE, not what any camera is rendering with: every camera mode that has an entry in UB1CameraJsonDataAsset.GameOptionPresetSetting.DefaultPresetMap uses that entry instead, and ShoulderView and Free both have one, so in practice only the world map camera reads this. Use camera.get_view for the field of view actually in effect.

Metadata

FieldValue
DisplayGet FOV Preference (degrees)
Categorycamera
AccessPublic
ScopeB1Standalone
Tags—
Aliases—

Parameters

  • This command takes no parameters.

Returns

Returns a JSON object with the following fields:

FieldTypeRequiredDescription
fov_degfloatyesField of view preference in degrees, vertical
fov_ratiostringyesThe same preference as the 0-1 normalized value the option system stores, mapped over fov_min..fov_max. Identical to camera.get_settings fov
fov_minfloatyesSmallest FOV in degrees the preference accepts (UB1CameraJsonDataAsset FovMin)
fov_maxfloatyesLargest FOV in degrees the preference accepts (UB1CameraJsonDataAsset FovMax)
fov_axisstringyesWhich axis the value constrains; always vertical for this setting

Usage

await inzoi.cli.execute('camera.get_fov_preference');