// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // One measured quarter-turn // Not compiled or tested in-world // Setup: Put in a nonphysical unlinked object or linkset root at the intended resting rotation. Owner-touch to toggle. // Stop / restore: Touch again to restore the captured orientation before removal or reset. // Notes: Moves the actual orientation in one step; no timer or persistent target-omega. Child prims follow the root. // License: see LICENSE in this distribution. // Original Incoprea example. MIT. Not compiled or tested in-world. rotation home; integer turned; default { state_entry() { home = llGetRot(); } touch_start(integer count) { if (llDetectedKey(0) != llGetOwner() || llGetLinkNumber() > 1) return; if (llGetStatus(STATUS_PHYSICS)) return; turned = !turned; if (turned) llSetRot(llEuler2Rot(<0.0, 0.0, PI_BY_TWO>) * home); else llSetRot(home); } }