From b5ac82bde237cb2b0a5b4b46cea0e388018ca5fe Mon Sep 17 00:00:00 2001 From: "OpenGenesis (MPL 2.0)" <153564363+opengenesislink@users.noreply.github.com> Date: Tue, 13 Oct 2026 21:47:51 +0200 Subject: [PATCH] docs(lsl): document stationary touch repeat compatibility --- doc/OpenGenesisLINK/LSL_TOUCH_HOLD_COMPAT.md | 40 ++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 doc/OpenGenesisLINK/LSL_TOUCH_HOLD_COMPAT.md diff --git a/doc/OpenGenesisLINK/LSL_TOUCH_HOLD_COMPAT.md b/doc/OpenGenesisLINK/LSL_TOUCH_HOLD_COMPAT.md new file mode 100644 index 00000000..0b659a46 --- /dev/null +++ b/doc/OpenGenesisLINK/LSL_TOUCH_HOLD_COMPAT.md @@ -0,0 +1,40 @@ +# Stationary touch hold compatibility (OpenGenesisLINK) + +## Regression + +In OpenSimulator, some viewers emit `GrabUpdate` only when the mouse moves. +The old script dispatch path emitted LSL `touch()` only for each received +`GrabUpdate`. Second Life scripts that expect repeated `touch()` while a +mouse button is held stationary would not advance. + +The region scene now repeats the `touch()` event approximately every +100 milliseconds while the grab remains active. Repetition is driven by +the existing region heartbeat (the actual interval depends on region FPS). +A real `GrabUpdate` still dispatches normally and postpones the next +synthetic event to reduce duplicates. + +Touches are isolated per avatar, obey prim-to-root `PassTouches` routing, +stop upon `DeGrab`, remove client, scene shutdown, removed prim, or lost +touch handler, and expire after five minutes as a fail-safe against a lost +release packet. The heartbeat dispatch never grabs or moves the object. + +## Manual smoke test + +Use `tools/diagnostics/ogl_lsl_touch_hold_smoke.lsl` in a prim on a +region running the updated server. + +1. Hold the left mouse button over the prim *without moving the pointer* + for at least two seconds. Expect `PASS` and several `touch()` calls. +2. Perform a short click (under one second). Expect one `touch_start` + and `touch_end`; the object need not receive a `touch()` event. +3. Hold and move the pointer. Expect touch callbacks, but no burst of + duplicate callbacks when movement stops. +4. Repeat with two different avatars on separate objects and verify one + avatar's release does not interrupt the other. +5. Test child-prim touching with `PassTouches` enabled and disabled. + Events must route the same way as regular `GrabUpdate` events. +6. Delete the object, teleport, and disconnect while holding. There + must be no remaining touch stream or exceptions in simulator logs. + +The test complements CI builds; it is not a substitute for an in-viewer +runtime verification.