// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Choose a viewing distance that frames a sphere // Not compiled or tested in-world // Setup: Use a spare owned prim. Set positive radius, vertical FOV and aspect ratio. Touch for private calculations. // Stop / restore: Disable/remove. No camera or object settings are changed. // Notes: Uses the more restrictive half-angle; add margin in your own layout for labels or off-center framing. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Transform planning only. float RADIUS=3.0; float VERTICAL_FOV=60.0; float ASPECT=1.7777778; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; if(RADIUS<=0.0||VERTICAL_FOV<=1.0||VERTICAL_FOV>=170.0||ASPECT<=0.0) { llOwnerSay("Invalid inputs."); return; } float vertical=VERTICAL_FOV*DEG_TO_RAD*0.5; float horizontal=llAtan2(llTan(vertical)*ASPECT,1.0); float limit=vertical; if(horizontal