// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Distance along a circular path // Not compiled or tested in-world // Setup: Put in a spare prim you own. Set RADIUS, DISTANCE, and START_DEGREES. Touch to calculate an XY offset around the origin. // Stop / restore: Disable or remove the script. It only reports to its owner and does not change prim properties. Reset clears its temporary state. // Notes: Negative distance travels clockwise. Radius must be positive. Multiple revolutions are allowed; no object moves. // License: see LICENSE in this distribution. // Original Incoprea example. MIT. Owner-only calculation; no scene changes. float RADIUS = 4.0; float DISTANCE = 6.0; float START_DEGREES = 30.0; default { touch_start(integer detectedCount) { if (llDetectedKey(0) != llGetOwner()) return; if (RADIUS <= 0.0) { llOwnerSay("Radius must be positive."); return; } float delta = DISTANCE / RADIUS; float angle = START_DEGREES * DEG_TO_RAD + delta; llOwnerSay("Travel angle: " + (string)(delta * RAD_TO_DEG) + " degrees"); llOwnerSay("Offset: " + (string)); } changed(integer change) { if (change & CHANGED_OWNER) llResetScript(); } }