Removing a touch handler while a touch is being held makes the object movable.
tracked
SungAli Resident
I discovered this in SLua where adding and removing handlers is a regular feature, but I was able to reproduce it in LSL using state changes for the same purpose.
!!!Substantially more info in the Environment, Details, and Steps to Reproduce fields, but those don't seem to be visible to anyone but me, and I supposed the privileged LL users. Useless for other user review, but when I try to post with everything here, I get an error. I'll add the other fields as comments so that others can see them until this gets fixed. (I suspect somebody is actually working on the canny system as I type, due to the changes I see as when I reload.)!!!
Log In
M
Mercury Linden
marked this post as
tracked
SungAli Resident
ENVIRONMENT:
Any. Tested in both SLua enable sims and LSL only sims.
DETAILS:
Removing touch event handlers in an object while a touch is being held on the object causes a non-physical object to become draggable as though it were physical until the touch is released or a handler is add/activated again.
Note: Others beside the owner can also do this with the object only if any of the following are true: Anyone Can Move is checked, the person has edit rights for the owner's objects, or the object is set to a group and Share is checked and the person belongs to the same group.
Rez a box. Add the script from the attached text file and start it.
Observe the box cycling between Green (touch handler active) and Red (handler removed).
Touch the box while it is green. Hold the touch until the box turns red. Drag the box using the usual physical drag options
Observe that the box moves as though physical (though not following the mouse as well as it ought) until the mouse is released or the touch handler is reactivated. This cycle may be repeated any number of times during a single touch.
I have not examined the effects of having different touch events in each state. I presume that would work as expected. However the problem does at least exist for both touch and touch_start. It is not relevant to touch_end as such since that is triggered on release.