llDetectedTouch* functions returns default data when used in MouseLook
tracked
BeckHan Ra
- THIS ISSUE IS NOT FIXED AS OF Second Life Release 26.1.0.22641522367 (64bit) !!!
When clicking objects in mouselook, llDetectedTouchUV returns <-1.00000, -1.00000, 0.00000> instead of proper coordinates you get when you click a prim in 3rd person.
PLEASE TEST YOUR STUFF BEFORE CLAIMING IT'S FIXED!
Thanks.
Log In
Dan Linden
Dan Linden
marked this post as
tracked
Maestro Linden
Thanks for the clarification that you're specifically looking at
touch_start()
events. I can confirm that with the same environment as before, mouselook-mode touches trigger correct touch position data in touch()
and touch_end()
, but that touch_start()
shows invalid/default data. My updated repro script demonstrates this: string getTouchDetails()
{
return "\nmouselook mode?=" + (string)((llGetAgentInfo(llDetectedKey(0)) & AGENT_MOUSELOOK ) != FALSE)
+ "\nTouchFace=" + (string)llDetectedTouchFace(0)
+ "\nTouchPos=" + (string)llDetectedTouchPos(0)
+ "\nTouchNormal=" + (string)llDetectedTouchNormal(0)
+ "\nTouchBinormal=" + (string)llDetectedTouchBinormal(0)
+ "\nTouchUV=" + (string)llDetectedTouchUV(0)
+ "\nTouchST=" + (string)llDetectedTouchST(0);
}
default
{
touch_start(integer num_detected)
{
llWhisper(0, "touch_start() " + getTouchDetails());
}
touch(integer num_detected)
{
llWhisper(0, "touch() " + getTouchDetails());
}
touch_end(integer num_detected)
{
llWhisper(0, "touch_end() " + getTouchDetails());
}
}
Output looks like this:
Object whispers: touch_start()
mouselook mode?=1
TouchFace=0
TouchPos=<0.00000, 0.00000, 0.00000>
TouchNormal=<0.00000, 0.00000, 0.00000>
TouchBinormal=<0.00000, 0.00000, 0.00000>
TouchUV=<-1.00000, -1.00000, 0.00000>
TouchST=<-1.00000, -1.00000, 0.00000>
Object whispers: touch()
mouselook mode?=1
TouchFace=0
TouchPos=<210.73990, 96.49120, 21.07271>
TouchNormal=<0.59538, 0.40313, 0.69499>
TouchBinormal=<0.47760, -0.87317, 0.09734>
TouchUV=<0.82409, 0.77414, 0.00000>
TouchST=<0.77414, 0.17591, 0.00000>
...
Object whispers: touch_end()
mouselook mode?=1
TouchFace=0
TouchPos=<210.73770, 96.49067, 21.07449>
TouchNormal=<0.58762, 0.40138, 0.70256>
TouchBinormal=<0.47747, -0.87301, 0.09939>
TouchUV=<0.82425, 0.77781, 0.00000>
TouchST=<0.77781, 0.17575, 0.00000>
I see that the initial
ObjectGrab
message that the viewer sends is the origin of the missing position data for touch_start:OUT ObjectGrab [ZEROCODED]
# ID: 913
[AgentData]
AgentID = [[AGENT_ID]]
SessionID = [[SESSION_ID]]
[ObjectData]
LocalID = 135555070
GrabOffset = <0.0, 0.0, 0.0>
[SurfaceInfo]
UVCoord = <-1.0, -1.0, 0.0>
STCoord = <-1.0, -1.0, 0.0>
FaceIndex = 0
Position = <0.0, 0.0, 0.0>
Normal = <0.0, 0.0, 0.0>
Binormal = <0.0, 0.0, 0.0>
Maestro Linden
marked this post as
needs info
Maestro Linden
It's working for me with this environment:
Second Life Release 26.1.0.22641522367 (64bit)
Release Notes
You are at 22.5, 32.5, 34.2 in Main Channel Sandbox A located at simhost-0766489e40bf50e4b.agni
SLURL: https://maps.secondlife.com/secondlife/Main%20Channel%20Sandbox%20A/23/33/34
(global coordinates 336663.0, 303392.0, 34.2)
Second Life Server 2026-01-28.21455867889
Release Notes
CPU: Apple M1 Pro (2400 MHz)
Memory: 16384 MB
OS Version: macOS 26.3.1 Darwin 25.3.0 Darwin Kernel Version 25.3.0: Wed Jan 28 20:54:46 PST 2026; root:xnu-12377.91.3~2/RELEASE_ARM64_T6000 arm64
Graphics Card Vendor: Apple
Graphics Card: Apple M1 Pro
OpenGL Version: 4.1 Metal - 90.5
Window size: 1065x795
Font Size Adjustment: 96pt
UI Scaling: 0.75
Draw distance: 96m
Bandwidth: 10000kbit/s
LOD factor: 1.125
Render quality: 1
Texture memory: 12124MB
Disk cache: Max size 2150.4 MB (100.0% used)
HiDPI display mode:
J2C Decoder Version: KDU v8.4.1
Audio Driver Version: OpenAL, version 1.1 ALSOFT 1.24.2 / OpenAL Community / OpenAL Soft: OpenAL Soft
Dullahan: 1.24.0.202510081737
CEF: 139.0.40+g465474a+chromium-139.0.7258.139
Chromium: 139.0.7258.139
LibVLC Version: 3.0.21
Voice Server Version: Vivox 4.10.0000.32327.5fc3fe7c.5942f08
Packets Lost: 0/3706 (0.0%)
March 16 2026 08:44:30
Here's what I did:
- Rez a sphere (this will provide more interesting normal/binormal info)
- Create the repro script from https://github.com/secondlife/viewer/issues/1519 in the sphere
- Press the 'M' key to enter mouselook mode
- Aim for the sphere and press LMB to touch it
The output I see is definitely not default value, which would be
TOUCH_INVALID_TEXCOORD = <-1.0, -1.0, 0.0>
:[8:46 AM] Object whispers: TouchFace=0
TouchPos=<23.89070, 34.72210, 33.48238>
TouchNormal=<0.75186, -0.65659, 0.05994>
TouchBinormal=<-0.65931, -0.74928, 0.06234>
TouchUV=<0.62674, 0.53760, 0.00000>
TouchST=<0.53760, 0.37326, 0.00000>
[8:46 AM] Object whispers: TouchFace=0
TouchPos=<23.89070, 34.72210, 33.48318>
TouchNormal=<0.75184, -0.65632, 0.06313>
TouchBinormal=<-0.65931, -0.74933, 0.06172>
TouchUV=<0.62674, 0.53863, 0.00000>
TouchST=<0.53863, 0.37326, 0.00000>
...
Can you reproduce the bug when you follow those steps? If not, what are you doing differently to get a TOUCH_INVALID_TEXCOORD result?
BeckHan Ra
Maestro Linden
Just a simple
default
{
touch_start(integer total_number)
{
llSay(0, (string)llDetectedTouchUV(0));
}
}
causes the issue
when I use your test code, it seem to return correct values, but whenever I make my own, it always fails to produce expected results. Maybe try replacing touch() with touch_start()? I think this is what makes your code fail for me