// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Project a build point into planar UVs // Not compiled or tested in-world // Setup: Place in a spare owned prim. Set POINT, ORIGIN, U_AXIS and V_AXIS, each axis scaled to one texture repeat. Touch for owner-only output. // Stop / restore: Remove/disable. The script calculates only; no scene properties change. // Notes: Axes must be nonzero and perpendicular. This does not inspect mesh UVs; it plans a projection. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Planning only. vector POINT=<3.0,4.0,2.0>; vector ORIGIN=ZERO_VECTOR; vector U_AXIS=<2.0,0.0,0.0>; vector V_AXIS=<0.0,2.0,0.0>; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; float uu=U_AXIS*U_AXIS; float vv=V_AXIS*V_AXIS; if(uu<0.000001||vv<0.000001||llFabs(U_AXIS*V_AXIS)>0.0001) { llOwnerSay("Use nonzero perpendicular axes."); return; } vector delta=POINT-ORIGIN; llOwnerSay("Planar UV="+(string)<(delta*U_AXIS)/uu,(delta*V_AXIS)/vv,0.0>); } }