// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Sample an ideal projectile arc // Not compiled or tested in-world // Setup: Place in a spare owned prim. Set START, VELOCITY, GRAVITY and positive DURATION. Touch for owner-only output. // Stop / restore: Remove/disable. The script calculates only; no scene properties change. // Notes: This is ideal kinematics with no collisions or drag. It does not rez or launch a projectile. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Planning only. vector START=<0.0,0.0,1.0>; vector VELOCITY=<4.0,0.0,6.0>; vector GRAVITY=<0.0,0.0,-9.81>; float DURATION=1.0; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; if(DURATION<=0.0) { llOwnerSay("Positive duration required."); return; } integer i; for(i=0;i<=4;++i) { float t=DURATION*(float)i/4.0; llOwnerSay("t="+(string)t+" position="+(string)(START+VELOCITY*t+0.5*GRAVITY*t*t)); } } }