Jump to content

Both DetectedTouchFace and UV


TonyBowlin
 Share

You are about to reply to a thread that has been inactive for 2264 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

So my goal is to be able to have an object with 6 faces that when clicked can detect what face is clicked then detect what section of the face in a 2 by 2 grid then rez an object from that spot within the grid. Only thing is Im not sure how to add both after I already made the DetectedUV. Any help would be great.

 

integer rows    = 2;
integer columns = 2;
default
{
    touch_start(integer num_detected)
    {
        vector touchUV = llDetectedTouchUV(0);
        integer rows = (integer) (touchUV.y*rows);
        integer columns = (integer)(touchUV.x*columns);
        integer grid = rows*columns + columns;
        integer face = llDetectedTouchFace(0);

        if (grid == 0) llSay(0,"Rez Object 1");
        if (grid == 1) llSay(0,"Rez Object 2");
        if (grid == 2) llSay(0,"Rez Object 3");
        if (grid == 3) llSay(0,"Rez Object 4");
}
}

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2264 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...