<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.osgrid.org/index.php?action=history&amp;feed=atom&amp;title=LlDetectedTouchST</id>
	<title>LlDetectedTouchST - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.osgrid.org/index.php?action=history&amp;feed=atom&amp;title=LlDetectedTouchST"/>
	<link rel="alternate" type="text/html" href="http://wiki.osgrid.org/index.php?title=LlDetectedTouchST&amp;action=history"/>
	<updated>2026-10-25T11:50:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>http://wiki.osgrid.org/index.php?title=LlDetectedTouchST&amp;diff=98&amp;oldid=prev</id>
		<title>Osgridadmin: Created page with &quot;==Function: vector llDetectedTouchST( integer index );== Returns a vector that is the surface coordinates for where the prim was touched. The x &amp; y vector positions contain th...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.osgrid.org/index.php?title=LlDetectedTouchST&amp;diff=98&amp;oldid=prev"/>
		<updated>2017-12-30T17:56:05Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Function: vector llDetectedTouchST( integer index );== Returns a vector that is the surface coordinates for where the prim was touched. The x &amp;amp; y vector positions contain th...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Function: vector llDetectedTouchST( integer index );==&lt;br /&gt;
Returns a vector that is the surface coordinates for where the prim was touched. The x &amp;amp; y vector positions contain the horizontal (s) &amp;amp; vertical (t) face coordinates respectively (&amp;lt; s, t, 0.0&amp;gt;). Each component is in the interval [0.0, 1.0]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
[[TOUCH_INVALID_TEXCOORD]] is returned when the surface coordinates cannot be determined. See Caveats for further details.&lt;br /&gt;
• integer 	index 	– 	Index of detection information 	 &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
index does not support negative indexes. &amp;lt;br&amp;gt;&lt;br /&gt;
For the touch category of events only. The prim that was touched may not be the prim receiving the event, use [[llDetectedLinkNumber]] to check for this; likewise you can use [[llDetectedTouchFace]] to determine which face was touched. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Caveats&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
[[TOUCH_INVALID_TEXCOORD]] is returned when... &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
• The avatar&amp;#039;s viewer does not support face touch detection. &amp;lt;br&amp;gt;&lt;br /&gt;
-• To check if face touch detection is supported check the return of [[llDetectedTouchFace]].  &amp;lt;br&amp;gt;&lt;br /&gt;
• The touch has moved off the surface of the prim. &amp;lt;br&amp;gt;&lt;br /&gt;
• The touch happened too close to the edge of the face to determine a location. &amp;lt;br&amp;gt;&lt;br /&gt;
• The triggering event is not a touch event.  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Examples&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;lsl&amp;quot;&amp;gt;&lt;br /&gt;
default {&lt;br /&gt;
 &lt;br /&gt;
    touch_start(integer num_detected) {&lt;br /&gt;
        integer i = 0;&lt;br /&gt;
        for(; i &amp;lt; num_detected; ++i ) {&lt;br /&gt;
            vector touchedpos = llDetectedTouchST(i);      &lt;br /&gt;
 &lt;br /&gt;
            if (llDetectedTouchFace(i) == -1) {&lt;br /&gt;
                llWhisper(0, &amp;quot;Sorry, your viewer doesn&amp;#039;t support touched faces.&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
            else if ( touchedpos == TOUCH_INVALID_TEXCOORD ) {&lt;br /&gt;
                llWhisper(0, &amp;quot;Sorry, the surface touch position could not be determined.&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
            else {&lt;br /&gt;
                llWhisper(0, (string) touchedpos);&lt;br /&gt;
            }&lt;br /&gt;
        } // while ...&lt;br /&gt;
    } // touch_start&lt;br /&gt;
 &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|&amp;lt;source lang=&amp;quot;lsl&amp;quot;&amp;gt;&lt;br /&gt;
vector touchedLoc;&lt;br /&gt;
 &lt;br /&gt;
default {&lt;br /&gt;
 //Draws a cross-hair at the detected Location on the detected face.&lt;br /&gt;
 &lt;br /&gt;
    touch(integer num_detected) {&lt;br /&gt;
        integer i;&lt;br /&gt;
        for (i = 0; i &amp;lt; num_detected; i++) {&lt;br /&gt;
            touchedLoc = llDetectedTouchST(i); //What location has been touched?&lt;br /&gt;
            llSetPrimitiveParams([PRIM_TEXTURE, llDetectedTouchFace(i), &amp;quot;5ac7995c-4c24-8b60-ae61-6a837619dc75&amp;quot;,&lt;br /&gt;
                          &amp;lt;1.0,1.0,0.0&amp;gt;, touchedLoc, 180*DEG_TO_RAD]); //Set the Texture Location at the touched location&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
See Also &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Events&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
•  	[[touch_start]] 	 &amp;lt;br&amp;gt;		&lt;br /&gt;
•  	[[touch]] 	 &amp;lt;br&amp;gt;		&lt;br /&gt;
•  	[[touch_end]] 	 &amp;lt;br&amp;gt;		&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Functions&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
•  	[[llDetectedLinkNumber]] 	 &amp;lt;br&amp;gt;		&lt;br /&gt;
•  	[[llDetectedTouchFace]] 	 &amp;lt;br&amp;gt;		&lt;br /&gt;
•  	[[llDetectedTouchUV]] 	 &amp;lt;br&amp;gt;		&lt;br /&gt;
•  	[[llDetectedTouchPos]] 	 &amp;lt;br&amp;gt; 	&lt;br /&gt;
•  	[[llDetectedTouchNormal]]  &amp;lt;br&amp;gt;			&lt;br /&gt;
•  	[[llDetectedTouchBinormal]]  &amp;lt;br&amp;gt;&amp;lt;br&amp;gt;			&lt;br /&gt;
Deep Notes &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;History&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
Introduced in Viewer SVN:870 r92872 Branch:Release Wednesday, 23 July 2008, Supported by Beta Server 1.24.0.93754 (Wenesday 6th August 2008), and viewer binary 1.20.15 (93532). &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Osgridadmin</name></author>
	</entry>
</feed>