“LlGround”的版本间的差异
| 第32行: | 第32行: | ||
} | } | ||
} | } | ||
| − | <pre> | + | </pre> |
2020年8月20日 (四) 10:19的最新版本
| 首页 | 函数 | 事件 | 类型 | 操作符 | 常数 | Flow Control | Script Library | Categorized Library | Tutorials |
| 函数名 |
|---|
| 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 |
| 相关事件 |
|---|
| 无 |