// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Evaluate a three-level transform chain // Not compiled or tested in-world // Setup: Use a spare owned prim. Set the supplied local poses for each level. Touch for private calculations. // Stop / restore: Disable/remove. No camera or object settings are changed. // Notes: Parent scale is excluded. Prints both the final world point and orientation. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Transform planning only. vector BASE_POS=<5.0,5.0,1.0>; vector ARM_OFFSET=<2.0,0.0,0.0>; vector TOOL_OFFSET=<1.5,0.0,0.0>; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; rotation base=llEuler2Rot(<0.0,0.0,30.0>*DEG_TO_RAD); rotation armLocal=llEuler2Rot(<0.0,20.0,40.0>*DEG_TO_RAD); rotation toolLocal=llEuler2Rot(<10.0,0.0,0.0>*DEG_TO_RAD); vector armPos=BASE_POS+ARM_OFFSET*base; rotation armWorld=armLocal*base; vector toolPos=armPos+TOOL_OFFSET*armWorld; llOwnerSay("Tool position="+(string)toolPos+" rotation="+(string)(toolLocal*armWorld)); } }