LlDetectedTouchNormal

来自人工智能助力教育知识百科
跳转至: 导航搜索

Template:Needs Translation/


函数名
Function: vector llDetectedTouchNormal( integer index );
参数:整数索引—检测信息索引不支持负索引。
返回值:返回一个向量,该向量是触发触摸事件的表面法线(垂直于表面)。与llDetectedTouchBinormal (llDetectedTouchBinormal)一起,该信息可用于查找触摸位置的切线空间。
注意事项
注意事项
  • 如果索引超出界限,脚本将继续执行,不会出现错误消息。
  • 当…时返回TOUCH_INVALID_VECTOR
    • 头像查看器不支持面部触摸检测。
      • 检查是否支持face touch检测,检查llDetectedTouchFace返回。
    • 触摸已经离开了表面的prim。
    • 触发的事件不是触摸事件。
示例
default
{
    touch_start(integer total_num)
    {
        llOwnerSay((string)llDetectedTouchNormal(0)); //Says the vector where the touched face is pointing to.
    }
}
相关函数
llDetectedLinkNumber

llDetectedTouchFace llDetectedTouchST llDetectedTouchUV llDetectedTouchPos llDetectedTouchBinormal

相关事件
touch_start

touch touch_end