Difference between revisions of "LlGround/ja"

From Second Life Wiki
Jump to navigation Jump to search
(New page: {{LSL_Function/ja |func_id=42|func_sleep=0.0|func_energy=10.0 |sort=Ground |func=llGround|sort=Ground |return_type=float|p1_type=vector|p1_name=offset |func_footnote='''offset'''のXとY...)
 
 
(3 intermediate revisions by one other user not shown)
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'''のXとYの構成のみが重要です。
|func_footnote='''offset''' の X 座標と Y 座標だけが重要です。
|func_desc
|func_desc
|return_text='''offset'''とプリム真下の地面高に'''offset'''を足した
|return_text=プリム真下に '''offset''' を足した地面の高さ
|spec
|spec
|caveats=*要求された場所は同じSimである必要があります。
|caveats=*指定された場所は同じ SIM である必要があります。
|constants
|constants
|examples=
|examples=
<lsl>// Get the object to land on the ground or on the water
<source lang="lsl2">// オブジェクトを着陸させたり着水させたりします
// by Konigmann Lippmann & Strife Onizuka
// by Konigmann Lippmann & Strife Onizuka
FindGroundOrWater()
FindGroundOrWater()
Line 21: Line 21:
     vector vTarget = llGetPos();
     vector vTarget = llGetPos();


     //llSetPos can only move 10m at a time.
     //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 35: Line 35:
         FindGroundOrWater();
         FindGroundOrWater();
     }
     }
}</lsl>
}</source>
|helpers
|helpers
|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]]|存在する隣接Simを返します}}
{{LSL DefineRow||[[llEdgeOfWorld/ja|llEdgeOfWorld]]|隣接 SIM が存在するかを返します}}
|also_tests
|also_tests
|also_events
|also_events

Latest revision as of 15:02, 25 February 2016

要約

関数: float llGround( vector offset );

プリム真下に offset を足した地面の高さを float で返します。

• vector offset

offset の X 座標と Y 座標だけが重要です。

警告

  • 指定された場所は同じ SIM である必要があります。
All Issues ~ Search JIRA for related Bugs

サンプル

// オブジェクトを着陸させたり着水させたりします
// 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();
    }
}

関連項目

関数

•  llGroundContour 地面の等高線を取得します
•  llGroundNormal 地面の法線を取得します
•  llGroundSlope 地面の傾斜を取得します
•  llEdgeOfWorld 隣接 SIM が存在するかを返します

特記事項

Search JIRA for related Issues

Signature

function float llGround( vector offset );
この翻訳は 原文 と比べて古いですか?間違いがありますか?読みにくいですか?みんなで 修正 していきましょう! (手順はこちら)
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。