LlGetCameraFOV
Looking for the current API? Open the llGetCameraFOV reference →
Return value notes
Returns a float value for the current camera's field of view (FOV), in radians, of the agent for which the task has permissions.
Caveats
Returns zero when permissions have not been granted.
Examples
// 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);
}
else
{
llRequestPermissions(llGetOwner(), PERMISSION_TRACK_CAMERA);
}
}
}See also: functions
Additional wiki content
LSL Function/permission:
{{LSL_Function/permission|PERMISSION_TRACK_CAMERA}}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.