“LlGround”的版本间的差异

来自人工智能助力教育知识百科
跳转至: 导航搜索
(创建页面,内容为“{{LSL Header|ml=*}}{{LSLC|Keywords}}{{LSLC|Flow Control}}{{LSLC|}} {{函数详情 |函数名 = Function: float llGround( vector offset ); |参数= 参数: vecto…”)
 
Ty讨论 | 贡献
第36行: 第36行:
  
 
|相关函数=
 
|相关函数=
*llGroundContour – Gets the ground contour
+
llGroundContour – Gets the ground contour
*llGroundNormal – Gets the ground normal
+
llGroundNormal – Gets the ground normal
*llGroundSlope – Gets the ground slope
+
llGroundSlope – Gets the ground slope
*llEdgeOfWorld – Returns existence of neighboring sims
+
llEdgeOfWorld – Returns existence of neighboring sims
  
 
|相关事件=无
 
|相关事件=无
  
 
}}
 
}}

2020年8月20日 (四) 09:42的版本

Template:Needs Translation/


函数名
Function: float llGround( vector offset );
参数:

vector offset – offset relative to the prim's position and expressed in local coordinates

返回值:

返回一个浮点数,该浮点数是直接低于prim位置偏移量的地面高度

注意事项
All Issues ~ Search JIRA for related Bugs
示例
示例一
// Makes the object land on ground or on water
 
FindGroundOrWater()
{
    vector vTarget = llGetPos();
    vTarget.z = llGround( ZERO_VECTOR );
    float fWaterLevel = llWater( ZERO_VECTOR );
    if( vTarget.z < fWaterLevel )
        vTarget.z = fWaterLevel;
    llSetRegionPos(vTarget);
}
 
default
{
    touch_start(integer total_number)
    {
        FindGroundOrWater();
    }
}
相关函数
llGroundContour – Gets the ground contour llGroundNormal – Gets the ground normal llGroundSlope – Gets the ground slope llEdgeOfWorld – Returns existence of neighboring sims
相关事件