Jump to content

NellyYui

New Resident
  • Posts

    5
  • Joined

  • Last visited

Reputation

0 Neutral
  1. Not trying to scale "st.y" was what I was missing. Thank you, I'll keep working on my stuff and come back if I hit an other wall.
  2. The "wacky scaling stuff" is the core of my question. How can we calculate an accurate offset at any scale. https://gyazo.com/819b502746749656cc7176c82d24e6df
  3. No, its to filter laziness out of myself I did, and there is still some kind of offset from the mouse and the center of the cross. Thank you very mush.
  4. I would like to know if anyone could explain with example how to use gltf transformation in script in a predictable way. Here a toy script I made. string cross_tex = "fabbb720-cb4c-f8a4-ba9b-b5c83451d73d"; string cross_mat = "21041079-6b74-3d0b-4092-89be5d4b3a84"; vector scl; scale() { scl = <0.1 + llFrand(1.8), 0.1 + llFrand(1.8), 0>; llSetLinkPrimitiveParamsFast(0, [PRIM_TEXT, (string)scl, <1,0,1>, 1]); } default { state_entry() { scale(); llSetLinkPrimitiveParamsFast(0, [ PRIM_TEXTURE, 0, cross_tex, scl, ZERO_VECTOR, 0, PRIM_RENDER_MATERIAL, 1, cross_mat, PRIM_RENDER_MATERIAL, 2, cross_mat, PRIM_RENDER_MATERIAL, 3, cross_mat, PRIM_RENDER_MATERIAL, 4, cross_mat, PRIM_RENDER_MATERIAL, 5, cross_mat ]); } touch(integer num_detected) { integer link = llDetectedLinkNumber(0); integer side = llDetectedTouchFace(0); //llOwnerSay("side: " + (string)side); vector st = llDetectedTouchST(0); if (side == 0) { vector zo = <0.5 * scl.x, 0.5 * scl.y, 0> + <-st.x * scl.x, -st.y * scl.y, 0>; llSetLinkPrimitiveParamsFast(link, [ PRIM_TEXTURE, side, cross_tex, scl, zo, 0 ]); } else { vector zo = st; llSetLinkPrimitiveParamsFast(link, [ PRIM_GLTF_BASE_COLOR, side, "", scl, zo, "", "", "", "", "", "" ]); } } touch_end(integer num_detected) { scale(); } } If you compile it in a prim cube, you can click drag the top face and the cross will chase your mouse. How can we get the same result on the side faces that use gltf?
×
×
  • Create New...