<?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=LlDetectedTouchFace</id>
	<title>LlDetectedTouchFace - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.osgrid.org/index.php?action=history&amp;feed=atom&amp;title=LlDetectedTouchFace"/>
	<link rel="alternate" type="text/html" href="http://wiki.osgrid.org/index.php?title=LlDetectedTouchFace&amp;action=history"/>
	<updated>2026-10-25T11:54:36Z</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=LlDetectedTouchFace&amp;diff=95&amp;oldid=prev</id>
		<title>Osgridadmin: Created page with &quot;==Function: integer llDetectedTouchFace( integer index );== Returns an integer that is the index of the face the avatar clicked on. &lt;br&gt; • integer 	index 	– 	Index of dete...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.osgrid.org/index.php?title=LlDetectedTouchFace&amp;diff=95&amp;oldid=prev"/>
		<updated>2017-12-30T17:53:25Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Function: integer llDetectedTouchFace( integer index );== Returns an integer that is the index of the face the avatar clicked on. &amp;lt;br&amp;gt; • integer 	index 	– 	Index of dete...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Function: integer llDetectedTouchFace( integer index );==&lt;br /&gt;
Returns an integer that is the index of the face the avatar clicked on. &amp;lt;br&amp;gt;&lt;br /&gt;
• integer 	index 	– 	Index of detection information 	 &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_FACE]] 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;
• The touch has moved off the surface of the prim.&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;&lt;br /&gt;
        for (i = 0; i &amp;lt; num_detected; i++) {&lt;br /&gt;
            integer touchedFace = llDetectedTouchFace(i);      &lt;br /&gt;
 &lt;br /&gt;
            if (touchedFace == -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 {&lt;br /&gt;
                // Store away the original color&lt;br /&gt;
                vector oldColor = llGetColor(touchedFace);&lt;br /&gt;
 &lt;br /&gt;
                // Flash white and black on the touched face&lt;br /&gt;
                llSetColor(&amp;lt;1., 1., 1.&amp;gt;, touchedFace);&lt;br /&gt;
                llSleep(0.1);&lt;br /&gt;
                llSetColor(&amp;lt;0., 0., 0.&amp;gt;, touchedFace);&lt;br /&gt;
                llSleep(0.1);&lt;br /&gt;
 &lt;br /&gt;
                // Put the color back to how we found it.&lt;br /&gt;
                llSetColor(oldColor, touchedFace);&lt;br /&gt;
            } // if ...&lt;br /&gt;
        } // for ...&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;
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;
•  	[[llDetectedTouchST]] 		 &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. &amp;lt;br&amp;gt;&lt;br /&gt;
• Server support available in Second Life Server 1.24.7.98039, client support in Release Candidate viewer 1.21.4 (98167) &amp;lt;br&amp;gt; &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Osgridadmin</name></author>
	</entry>
</feed>