TonyBowlin Posted February 13, 2018 Share Posted February 13, 2018 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 More sharing options...
TonyBowlin Posted February 13, 2018 Author Share Posted February 13, 2018 Nvm I just used a compounded if statement. I figured it out. =D 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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