Difference between revisions of "LSL Touch Position"

From Second Life Wiki
Jump to navigation Jump to search
m
Line 2: Line 2:




'''<tt>[[vector]] llDetectedTouchPos([[integer]] number)</tt>'''
'''<tt>[[vector]] [[llDetectedTouchPos]]([[integer]] number)</tt>'''


[[return|Returns]] the region coordinates of the position touched by [[detected]] [[object]] '''<tt>number</tt>'''.
[[return|Returns]] the region coordinates of the position touched by [[detected]] [[object]] '''<tt>number</tt>'''.




'''<tt>[[integer]] llDetectedTouchFace([[integer]] number)</tt>'''
'''<tt>[[integer]] [[llDetectedTouchFace]]([[integer]] number)</tt>'''


[[return|Returns]] the face of the position touched by [[detected]] [[object]] '''<tt>number</tt>'''.
[[return|Returns]] the face of the position touched by [[detected]] [[object]] '''<tt>number</tt>'''.




'''<tt>[[vector]] llDetectedTouchUV([[integer]] number)</tt>'''
'''<tt>[[vector]] [[llDetectedTouchUV]]([[integer]] number)</tt>'''


[[return|Returns]] the texture coordinates of the position touched by [[detected]] [[object]] '''<tt>number</tt>'''.
[[return|Returns]] the texture coordinates of the position touched by [[detected]] [[object]] '''<tt>number</tt>'''.


'''<tt>[[vector]] llDetectedTouchST([[integer]] number)</tt>'''
'''<tt>[[vector]] [[llDetectedTouchST]]([[integer]] number)</tt>'''


[[return|Returns]] the surface coordinates of the position touched by [[detected]] [[object]] '''<tt>number</tt>'''.
[[return|Returns]] the surface coordinates of the position touched by [[detected]] [[object]] '''<tt>number</tt>'''.




'''<tt>[[vector]] llDetectedTouchNormal([[integer]] number)</tt>'''
'''<tt>[[vector]] [[llDetectedTouchNormal]]([[integer]] number)</tt>'''


[[return|Returns]] the surface normal of the position touched by [[detected]] [[object]] '''<tt>number</tt>'''.  (A normal is a vector perpendicular to the surface.)
[[return|Returns]] the surface normal of the position touched by [[detected]] [[object]] '''<tt>number</tt>'''.  (A normal is a vector perpendicular to the surface.)




'''<tt>[[vector]] llDetectedTouchBinormal([[integer]] number)</tt>'''
'''<tt>[[vector]] [[llDetectedTouchBinormal]]([[integer]] number)</tt>'''


[[return|Returns]] the surface binormal of the position touched by [[detected]] [[object]] '''<tt>number</tt>'''.  (A binormal is a vector tangent to the surface pointing along the U direction of tangent space.)
[[return|Returns]] the surface binormal of the position touched by [[detected]] [[object]] '''<tt>number</tt>'''.  (A binormal is a vector tangent to the surface pointing along the U direction of tangent space.)

Revision as of 19:07, 24 July 2008

Here we propose an extension of the detected LSL functions to determine surface information for touch events. Each of the following functions is valid only inside touch_start, touch, and touch_end events. In the case of touch events, which are triggered repeatedly while the mouse button is held down, the surface information is valid (and is updatedly correctly) as long as the mouse remains over the surface of the object (allowing psuedo GUI builds with sliders, levers, dials, etc.)


vector llDetectedTouchPos(integer number)

Returns the region coordinates of the position touched by detected object number.


integer llDetectedTouchFace(integer number)

Returns the face of the position touched by detected object number.


vector llDetectedTouchUV(integer number)

Returns the texture coordinates of the position touched by detected object number.

vector llDetectedTouchST(integer number)

Returns the surface coordinates of the position touched by detected object number.


vector llDetectedTouchNormal(integer number)

Returns the surface normal of the position touched by detected object number. (A normal is a vector perpendicular to the surface.)


vector llDetectedTouchBinormal(integer number)

Returns the surface binormal of the position touched by detected object number. (A binormal is a vector tangent to the surface pointing along the U direction of tangent space.)

Call for Feedback

http://jira.secondlife.com/browse/SVC-1902


Links

http://jira.secondlife.com/browse/SVC-519

http://jira.secondlife.com/browse/SVC-574

http://jira.secondlife.com/browse/SVC-690

https://wiki.secondlife.com/wiki/Touch_Coordinates

http://wiki.secondlife.com/wiki/LlDetectedLinkFace

Internal LL Jira

https://jira.lindenlab.com/browse/DEV-9985