“LlGetRootPosition”的版本间的差异
(创建页面,内容为“{{LSL Header|ml=*}}{{LSLC|Keywords}}{{LSLC|Flow Control}}{{LSLC|}} {{函数详情 |函数名 = Function: vector llGetRootPosition( ); |参数= 参数:float val…”) |
(没有差异)
|
2020年6月29日 (一) 10:00的最新版本
首页 | 函数 | 事件 | 类型 | 操作符 | 常数 | Flow Control | Script Library | Categorized Library | Tutorials |
函数名 |
---|
Function: vector llGetRootPosition( ); |
参数:float val –must fall in the range [-1.0, 1.0] |
返回值:返回一个向量,该向量是附加到的对象脚本的根对象的区域位置 |
注意事项 |
---|
无 |
示例 |
---|
示例1
default{ touch_start( integer vIntTouched ){ string vStrMessage = "The prim with this script is "; if (llGetPos() != llGetRootPosition()){ vStrMessage += "NOT "; } llSay( PUBLIC_CHANNEL, vStrMessage + "centered on the root prim." ); } } Useful Snippets //-- 没有llSetLocalPos,这会增加匹配子基本物体中的llGetLocalPos()的功能 fSetLocalPos( vector vPosOffset ){ llSetPos( llGetRootPosition() + vPosOffset ); } //-- 这将移动根基本物体的偏移量,或者设置子基本物体相对于根的位置。 |
相关函数 |
---|
llGetLocalPos –获取子基本物体相对于根的位置
llGetPos – 获取基本物体的全局位置 llSetPos – 设置基本物体的全局位置 |
相关事件 |
---|
无 |