Difference between revisions of "LlDetectedTouchUV"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 16: Line 16:
* The touch happened too close to the edge of the face to determine a location.
* The touch happened too close to the edge of the face to determine a location.
* The triggering event is not a touch event.
* The triggering event is not a touch event.
|examples
|examples=
<lsl>
default
{
    touch_start(integer UV_detected)
    {
        integer i = 0;
        for(; i<UV_detected; ++i)
            llWhisper(0, "UV clicked: " + (string)llDetectedTouchUV(i));
    }
}
</lsl>
|helpers
|helpers
|related
|related
Line 32: Line 43:
|also_articles
|also_articles
|notes
|notes
|history=*Introduced in Viewer {{SVN|870|rev=92872|branch=Release|anchor=file14|date=Wednesday, 23 July 2008}}, no server support, no viewer binary released.
|history=*Introduced in Viewer {{SVN|870|rev=92872|branch=Release|anchor=file14|date=Wednesday, 23 July 2008}}.
*Server support available on preview grid in Second Life Beta Server 1.24, client support in Preview Grid viewer 1.20.15 (93532)
*Server support available in Second Life Server 1.24.7.98039, client support in Release Candidate viewer 1.21.4 (98167).
|cat1=Touch
|cat1=Touch
|cat2
|cat2

Revision as of 20:59, 2 October 2008

Summary

Function: vector llDetectedTouchUV( integer index );

Returns a vector that is the texture coordinates for where the prim was touched. The x & y vector positions contain the u & v face coordinates respectively (<u, v, 0.0>).

<-1.0, -1.0, 0.0> is returned when the touch UV coordinates cannot be determined. See Caveats for further details.

• integer index Index of detection information

index does not support negative indexes. For the touch category of events only.

Caveats

  • If index is out of bounds the script continues to execute without an error message.<-1.0, -1.0, 0.0> is returned when...
  • The avatar's viewer does not support face touch detection.
  • The touch has moved off the surface of the prim.
  • The touch happened too close to the edge of the face to determine a location.
  • The triggering event is not a touch event.
All Issues ~ Search JIRA for related Bugs

Examples

<lsl> default {

   touch_start(integer UV_detected)
   {
       integer i = 0;
       for(; i<UV_detected; ++i)
           llWhisper(0, "UV clicked: " + (string)llDetectedTouchUV(i));
   }

}

</lsl>

See Also

Deep Notes

History

Search JIRA for related Issues

Signature

function vector llDetectedTouchUV( integer index );