Jump to content

How to highlight mouse in a wearable transparent prim?


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

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

Recommended Posts

Hello everyone,

This question maybe its so basic then im going to laugh at the end but,

I have 3 linked prims, all are 100% tranparent with a transparent texture. 2 of them have diferent actions when touched/clicked, so far so good.

The problem is they dont show to the viewer they are clickable and i cant figured out why.

Thank you in advance for your help.

Edit: I forgot to say, they are wearable/added to the avatar :)

Link to comment
Share on other sites

The touch icon will only appear over a link that contains a script with a touch event in it, unless your script is in the root prim and you have configured the child prims to be touch sensitive.  You ought to be able to get the right response if you put your script in the root prim and then use llDetectedLinkNumber() to identify which link the user clicked on. Put a simple script in each child prim that says nothing more than

default{    state_entry()    {        llPassTouches(TRUE);    }    touch_start(integer num)    {    }}

I can't pop in world right now to test, but I believe it is true that you can delete the scripts in the child prims once they have configured the child prims.  llPassTouches controls a prim property that does not depend on a script once it has been set.

Link to comment
Share on other sites

I think a child prim passes touches to a script in the root prim by default, even if the child prim has its own script handling touches, and that llPassTouches() is only really needed to override that behavior (either to never pass touches, or pass them only when there's no active touch handler in the child.

Anyway, the problem here is likely one of getting the mouse-pointer to reflect the touchability of the surface under it, and this is where setting a regular, no-alpha channel texture to 100% transparent is different from using a transparent, all-alpha texture. Is there a special reason you need to use that transparent all-alpha texture, beyond just making it invisible?

You'll find similar problems in the transparent parts of alpha textures, by the way, and the difference is even more pronounced for right-click selection, which just doesn't work on alpha parts of a surface. In all cases, though, highlight-transparent (Control-Alt-T) will "expose" the alpha'd areas to the mouse, showing the touchable pointer and allowing right-click selection.

Link to comment
Share on other sites

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