function
Function syntax
float llGetCameraFOV();- Returns
float- Energy
- 10
- Permission
PERMISSION_TRACK_CAMERA
Returns a float representing the camera's current field of view (FOV) in radians of the agent who granted PERMISSION_TRACK_CAMERA. Returns 0.0 if permissions are not granted.
Returns a float value for the current camera’s field of view (FOV), in radians, of the agent for which the task has permissions.
float result = llGetCameraFOV();Caveats
Section titled “Caveats”Returns zero when permissions have not been granted.
Examples
Section titled “Examples”Example 1
20 collapsed lines
// say the camera aspect ratio and field of view (FOV)integer has_perms = FALSE;default{ on_rez(integer a) { llResetScript(); has_perms = FALSE; } state_entry() { llRequestPermissions(llGetOwner(), PERMISSION_TRACK_CAMERA); } run_time_permissions(integer permission) { has_perms = (permission == PERMISSION_TRACK_CAMERA); } touch_start(integer num_touches) { if (has_perms) { float aspect = llGetCameraAspect(); float fov = llGetCameraFOV(); llOwnerSay("aspect = " + (string)aspect + " FOV = " + (string)fov); }6 collapsed lines
else { llRequestPermissions(llGetOwner(), PERMISSION_TRACK_CAMERA); } }}See also
Section titled “See also”Functions
Section titled “Functions”llGetCameraAspectllGetCameraPosllGetCameraRotllSetCameraParamsllSetCameraAtOffsetllSetCameraEyeOffset
Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.