// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Match wheel rotation to distance traveled // Not compiled or tested in-world // Setup: Place in a spare owned prim. Set positive RADIUS and signed DISTANCE. Touch for private results. // Stop / restore: Disable/remove; no scene properties change. // Notes: Assumes rolling without slip; actual simulated wheel contact may differ. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Planning only. float RADIUS=0.5; float DISTANCE=7.0; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; if(RADIUS<=0.0) { llOwnerSay("Positive radius required."); return; } float radians=DISTANCE/RADIUS; float phase=radians-TWO_PI*llFloor(radians/TWO_PI); llOwnerSay("Total turns="+(string)(radians/TWO_PI)+" phase degrees="+(string)(phase*RAD_TO_DEG)); } }