// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Separate two overlapping aligned footprints // Not compiled or tested in-world // Setup: Use a spare owned prim. Set centers A/B and positive XY half-extents HA/HB. Touch for owner-only calculation output. // Stop / restore: Remove/disable. Does not sense, collide with, or modify actual objects. // Notes: Chooses one of equally minimal directions deterministically; it is not a swept collision solver. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Ideal geometry only. vector A=ZERO_VECTOR; vector B=<1.5,0.5,0.0>; vector HA=<2.0,1.0,0.0>; vector HB=<1.0,1.0,0.0>; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; if(HA.x<=0.0||HA.y<=0.0||HB.x<=0.0||HB.y<=0.0) { llOwnerSay("Positive half-extents required."); return; } vector d=B-A; float x=HA.x+HB.x-llFabs(d.x); float y=HA.y+HB.y-llFabs(d.y); if(x<=0.0||y<=0.0) { llOwnerSay("No overlap."); return; } vector shift=ZERO_VECTOR; if(x