Jump to content

touch through to another object


Rhiannon Arkin
 Share

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

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

Recommended Posts

Another weird question: 

I want to touch an object that sits behind another object that's invisible (alpha). 

I tried switching the top object to phantom, turned physics off, (it's a child) and was reading about various ll functions but it seems that the objects, albeit invisible, always block the 'touch' from reaching the object underneath. It is funny because the cursor does change to touch so it sees the touch object, but can't click on it because of the other geometry in front of it. 

arg.

thought i'd ask. 

 

 

Link to comment
Share on other sites

Nope.  The only trick is to remove the transparent object.  Of course, you could put a touch script in the transparent object and have it tell the one behind that it had just been touched, assuming that the two of them are close enough that the possibility of a false click is unlikely.

  • Like 2
Link to comment
Share on other sites

I would as Rolig suggest handle the touch in the invisible object, something like this if the objects are linked.

In the invisible object:

    touch_start(integer total_number)
    {
        llMessageLinked(LINK_ALL_OTHERS, 0, "you_touched_me", "");
    }

In the object behind:

    link_message(integer sender_num, integer num, string msg, key id)
    {
        if (msg=="you_touched_me")
        {
            llOwnerSay("Uhh it tickles :-)");
        }
    }

Notice, you can also examine the sender_num to ensure correct handling of touched object and avoid false clicks, but the simple solution above should work.

If the objects are not linked, you have to use llListen in the object behind and send message from the touched object.

Edited by Rachel1206
Link to comment
Share on other sites

  • 6 years later...
You are about to reply to a thread that has been inactive for 197 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...