Jump to content

question: Touch Event


chriz Breck
 Share

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

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

Recommended Posts

If a touch_start is in the root prim then it seems when ever you touch ANY part of the object cluster including the children that it triggers. Is there any way to avoid that so that only when I touch the prim in question does the event happen? That is without redeffining which prim is the rootprim.

Link to comment
Share on other sites

two ways

1) move the script to the child prim you want it to target

2) check which prim was touched with llDetectedLinkNumber

#1 has the benefit of only showing the touch cursor for the prim you want to actively receive touches, the drawback is that the script is moved out of the root, so more work to edit

#2 has the benefit of staying in the root prim (and could potentially handle multiple such button prims), but has the drawback that the whole object will show the touch cursor.

Link to comment
Share on other sites

  • 2 weeks later...


Hector Greenspan wrote:

Also, there just happens to be a function called llPassTouches()

 

If you set this to FALSE, touches do not propagate through the object in question. Can often save adding more scripts to an object!

Are you sure about that?  According to the wiki, it's so that a prim containing a touch event doesn't pass the touch back to the root as well as doing whatever its own script has to do with the touch.  The wiki has the caveat, 

This has no effect (whether set TRUE or FALSE) from the root. Touches are always passed to the parent when there is no touch event script in the child, even if this is set (TRUE or FALSE) within another event in a child's script. If you want to block touches from a child , you must add a script with a touch event in the child. This creates a default no passes.

https://wiki.secondlife.com/wiki/LlPassTouches

Link to comment
Share on other sites

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...