Page 1 of 1

Click Info Script

Posted: Fri Jan 03, 2020 9:54 pm
by admin
Updated my show information about the place on an object your click script.

drop the script into a prim, then click the object to get information about that link, face etc.

It now includes textures, you can then use that UUID to apply the texture to other items using the viewers.

Get the script on github

Code: Select all

default
{
    touch_start(integer total_number)
    {   
        integer linkNo = llDetectedLinkNumber(0);
        integer touchedFace = llDetectedTouchFace(0);
        vector touchedUVPos = llDetectedTouchUV(0);
        list primInfo = llGetLinkPrimitiveParams(linkNo,    
            [  
                PRIM_POS_LOCAL, 
                PRIM_ROT_LOCAL, 
                PRIM_SIZE, 
                PRIM_TEXTURE, touchedFace 
            ]);
        vector localPosition = llList2Vector(primInfo,0);
        rotation localRotation = llList2Rot(primInfo,1) ;
        vector primSize = llList2Vector(primInfo,2);
        string faceTexture = llList2String(primInfo, 3);
        llSay(0, " Link No: " +(string)linkNo + 
                 "\n Face No: " + (string)touchedFace +
                 "\n Texture: " + faceTexture +  
                 "\n UV Pos: " + (string)touchedUVPos +  
                 "\n local pos " + (string)localPosition +     
                 "\n local rotatoin " + (string)localRotation  + 
                 "\n Size " + (string)primSize);
    }
}