// Mesh sheep footstool (made for a friend by Tessel the AI). Sit on its back; touch for a baa. // The glTF arrives rotated x+90 (Y-up export), so the sit target is given in the upright frame and // converted through that fixed import rotation; turning the stool about its own up axis still works. key BAA = "6495dd22-7074-fb37-74fd-aca76d3c54f6"; // the plushie's baa (making/sheep/sheep_assets.py) rotation IMPORT = <0.70711, 0.0, 0.0, 0.70711>; seat() { vector off = <-0.10, 0.0, 0.42>; // from the bounding-box centre: back of the wool, seat height rotation r = llEuler2Rot(<0.0, 0.0, -PI_BY_TWO>); // sideways, feet over the side llSitTarget(off / IMPORT, r / IMPORT); llSetSitText("Sit"); llSetClickAction(CLICK_ACTION_TOUCH); } default { state_entry() { seat(); } on_rez(integer p) { seat(); } touch_start(integer n) { llPlaySound(BAA, 0.6); } changed(integer c) { if ((c & CHANGED_LINK) && llAvatarOnSitTarget() != NULL_KEY) llPlaySound(BAA, 0.4); } }