Difference between revisions of "LlGround/ja"
< LlGround
Jump to navigation
Jump to search
Mako Nozaki (talk | contribs) m (Undo revision 851062 by Mako Nozaki (Talk)) |
Mako Nozaki (talk | contribs) |
||
Line 4: | Line 4: | ||
|func=llGround|sort=Ground | |func=llGround|sort=Ground | ||
|return_type=float|p1_type=vector|p1_name=offset | |return_type=float|p1_type=vector|p1_name=offset | ||
|func_footnote='''offset''' | |func_footnote='''offset''' の X 座標と Y 座標だけが重要です。 | ||
|func_desc | |func_desc | ||
|return_text='''offset''' | |return_text=プリム真下に '''offset''' を足した地面の高さ | ||
|spec | |spec | ||
|caveats=* | |caveats=*指定された場所は同じ SIM である必要があります。 | ||
|constants | |constants | ||
|examples= | |examples= | ||
<lsl>// | <lsl>// オブジェクトを着陸させたり着水させたりします | ||
// by Konigmann Lippmann & Strife Onizuka | // by Konigmann Lippmann & Strife Onizuka | ||
FindGroundOrWater() | FindGroundOrWater() | ||
Line 21: | Line 21: | ||
vector vTarget = llGetPos(); | vector vTarget = llGetPos(); | ||
//llSetPos | //llSetPos では一度に 10 m しか移動させることができません | ||
integer iCounter = 1 + llAbs((integer)(vTarget.z - fHeight) / 10); | integer iCounter = 1 + llAbs((integer)(vTarget.z - fHeight) / 10); | ||
vTarget.z = fHeight; | vTarget.z = fHeight; | ||
Line 39: | Line 39: | ||
|also_functions= | |also_functions= | ||
{{LSL DefineRow||[[llGroundContour/ja|llGroundContour]]|地面の等高線を取得します}} | {{LSL DefineRow||[[llGroundContour/ja|llGroundContour]]|地面の等高線を取得します}} | ||
{{LSL DefineRow||[[llGroundNormal/ja|llGroundNormal]]| | {{LSL DefineRow||[[llGroundNormal/ja|llGroundNormal]]|地面の法線を取得します}} | ||
{{LSL DefineRow||[[llGroundSlope/ja|llGroundSlope]]|地面の傾斜を取得します}} | {{LSL DefineRow||[[llGroundSlope/ja|llGroundSlope]]|地面の傾斜を取得します}} | ||
{{LSL DefineRow||[[llEdgeOfWorld/ja|llEdgeOfWorld]]| | {{LSL DefineRow||[[llEdgeOfWorld/ja|llEdgeOfWorld]]|隣接 SIM が存在するかを返します}} | ||
|also_tests | |also_tests | ||
|also_events | |also_events |
Revision as of 17:34, 4 May 2010
LSL ポータル | 関数 | イベント | 型 | 演算子 | 定数 | 実行制御 | スクリプトライブラリ | カテゴリ別スクリプトライブラリ | チュートリアル |
警告
サンプル
<lsl>// オブジェクトを着陸させたり着水させたりします // by Konigmann Lippmann & Strife Onizuka FindGroundOrWater() {
float fHeight = llGround( ZERO_VECTOR ); float fWaterLevel = llWater( ZERO_VECTOR ); if( fHeight < fWaterLevel ) fHeight = fWaterLevel; vector vTarget = llGetPos();
//llSetPos では一度に 10 m しか移動させることができません integer iCounter = 1 + llAbs((integer)(vTarget.z - fHeight) / 10); vTarget.z = fHeight; do llSetPos( vTarget ); while( --iCounter );
}
default {
touch_start(integer total_number) { FindGroundOrWater(); }}</lsl>
関連項目
関数
• | llGroundContour | – | 地面の等高線を取得します | |
• | llGroundNormal | – | 地面の法線を取得します | |
• | llGroundSlope | – | 地面の傾斜を取得します | |
• | llEdgeOfWorld | – | 隣接 SIM が存在するかを返します |
特記事項
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。