// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Inspect the touched surface frame // Not compiled or tested in-world // Setup: Touch a visible surface as owner. // Stop / restore: Remove or disable. This inspector changes no build properties. // Notes: These are viewer-supplied touch vectors in region coordinates. Invalid or degenerate data is rejected; no object is rotated. // License: see LICENSE in this distribution. // Original Incoprea example. MIT. default { touch_start(integer count) { if(llDetectedKey(0)!=llGetOwner()) return; if(llDetectedTouchFace(0)==TOUCH_INVALID_FACE) { llOwnerSay("Surface data unavailable."); return; } vector normal=llDetectedTouchNormal(0); vector binormal=llDetectedTouchBinormal(0); if(llVecMag(normal)<0.0001 || llVecMag(binormal)<0.0001) { llOwnerSay("Degenerate touch frame."); return; } vector tangent=llVecNorm(binormal % normal); llOwnerSay("Normal: "+(string)normal+" / binormal: "+(string)binormal+" / tangent: "+(string)tangent); } changed(integer flags) { if(flags & CHANGED_OWNER) llResetScript(); } }