Jump to content

rotate DetectedTouchST results?


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

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

Recommended Posts

I'm trying to make a color picker for a HUD I'm building. I'm using Mesh Studio to build the link set, and convert it to mesh. The problem is, the coordinates for it is returning for the color seems like the face is rotated, even though the texture offset is correct for the crosshair I put on it. Do I need to rotate the vector or something to make it work?

I'm using the script here (which works normal on a legacy prim), and I changed the face numbers to the appropriate faces on the mesh

I tried rotating the prim for the color pallet before meshing it, and i get the same results. I also tested the other faces (luminosity, and the alpha) and they also seem to be rotated

You can see in the snapshot that I'm clicking on the lower part of the color pallet, and the color should be gray, but the preview panel and brightness panel are showing yellow, as if I clicked about the same point, but along the top of the pallet instead of the side

Snapshot_003.png

Link to comment
Share on other sites

I actually got it to work somehow, I kept playing around with the different axis placements in the calculations.

in the original script it's getting the HSL as:

vector v = llDetectedTouchST(0);
            HSL = <v.y, 1.0 - v.x, HSL.z>;

but in my fixed version it is:

vector v = -llDetectedTouchST(0);
            HSL = <-v.x,1-v.y, HSL.z>;

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 2549 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...