// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Split an offset along a rail // Not compiled or tested in-world // Setup: Use a spare owned prim. Set OFFSET and AXIS. Touch for owner-only results. // Stop / restore: Disable/remove. No scene properties change. // Notes: The two reported vectors add back to the input; a zero axis has no meaningful decomposition. // License: see LICENSE in this distribution. // Original Incoprea. MIT. vector OFFSET=<4.0,5.0,2.0>; vector AXIS=<1.0,1.0,0.0>; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; float denominator=AXIS*AXIS; if(denominator<0.000001) { llOwnerSay("Axis is zero."); return; } vector parallel=AXIS*((OFFSET*AXIS)/denominator); llOwnerSay("Along="+(string)parallel+"; across="+(string)(OFFSET-parallel)); } }