“LlGround”的版本间的差异
(未显示同一用户的1个中间版本) | |||
第32行: | 第32行: | ||
} | } | ||
} | } | ||
− | <pre> | + | </pre> |
|相关函数= | |相关函数= | ||
− | 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日 (四) 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 |
相关事件 |
---|
无 |