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
|