// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Project a point into an orthographic plan // Not compiled or tested in-world // Setup: Use a spare owned prim. Set camera pose, view width/height and point. Touch for private calculations. // Stop / restore: Disable/remove. No camera or object settings are changed. // Notes: Depth is reported separately and does not affect projected size. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Transform planning only. vector CAMERA=ZERO_VECTOR; vector CAMERA_EULER=<0.0,0.0,0.0>; vector POINT=<10.0,-2.0,1.0>; float WIDTH=8.0; float HEIGHT=6.0; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; if(WIDTH<=0.0||HEIGHT<=0.0) { llOwnerSay("Positive view size required."); return; } vector p=(POINT-CAMERA)/llEuler2Rot(CAMERA_EULER*DEG_TO_RAD); llOwnerSay("ScreenUV="+(string)<0.5-p.y/WIDTH,0.5-p.z/HEIGHT,0.0>+" depth="+(string)p.x); } }