// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Aim a ray through a physical display panel // Not compiled or tested in-world // Setup: Use a spare owned prim. Set EYE, PANEL_ORIGIN at lower-left, RIGHT/UP full-edge vectors and UV. Touch for private calculations. // Stop / restore: Disable/remove. No camera or object settings are changed. // Notes: RIGHT andUP define a plane and need not align with world axes. This is a virtual geometry model, not viewer camera control. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Transform planning only. vector EYE=<0.0,0.0,2.0>; vector PANEL_ORIGIN=<5.0,2.0,0.0>; vector RIGHT=<0.0,-4.0,0.0>; vector UP=<0.0,0.0,3.0>; vector UV=<0.7,0.6,0.0>; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; if(llVecMag(RIGHT%UP)<0.000001) { llOwnerSay("Panel edges are degenerate."); return; } vector target=PANEL_ORIGIN+RIGHT*UV.x+UP*UV.y; vector ray=target-EYE; if(llVecMag(ray)<0.000001) { llOwnerSay("Eye lies on target point."); return; } llOwnerSay("Panel point="+(string)target+" ray="+(string)llVecNorm(ray)); } }