// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Find the nearest planned anchor // Not compiled or tested in-world // Setup: Use a spare owned prim. Set ANCHORS and QUERY. Owner touch prints sample coordinates. // Stop / restore: Remove/disable. Nothing is rezzed or moved. // Notes: This uses provided coordinates only, not nearby avatars or scene sensing. Ties choose the first anchor. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Planning only. list ANCHORS=[<0.0,0.0,0.0>,<5.0,0.0,0.0>,<2.0,4.0,0.0>]; vector QUERY=<3.0,2.0,0.0>; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; integer n=llGetListLength(ANCHORS); if(n==0) { llOwnerSay("No anchors."); return; } integer best=0; float distance=llVecDist(QUERY,llList2Vector(ANCHORS,0)); integer i; for(i=1;i