LlWater/ja

From Second Life Wiki
< LlWater
Revision as of 06:56, 13 July 2009 by MasterOf Perl (talk | contribs) (Update translation)
Jump to navigation Jump to search

要約

関数: float llWater( vector offset );

オブジェクトの位置 + offset下の水位を float で返します。

• vector offset

offsetのXとY構成のみが意味を持ちます。
水位はそのSim全体を通して一定で、一般的には20メートルですが、それが普通というわけではありません。

警告

  • 要求される位置は同じSim内である必要があります。
All Issues ~ Search JIRA for related Bugs

サンプル

<lsl>// Gets the object to land on ground or on water // 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 can only move 10m at a time.
   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>

関連項目

関数

•  llGround 地面高を取得します
•  llWind 風の速さを取得します
•  llCloud 雲の密度を取得します

特記事項

Search JIRA for related Issues

Signature

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