LlGetRootPosition/ja

From Second Life Wiki
< LlGetRootPosition
Revision as of 06:00, 12 April 2010 by Mako Nozaki (talk | contribs) (Undo revision 849942 by Mako Nozaki (Talk))
Jump to navigation Jump to search

要約

関数: vector llGetRootPosition( );

スクリプトが添付されたプリムの親プリムのリージョン位置を vector で返します。

サンプル

<lsl> default{

 touch_start( integer vIntTouched ){
   string vStrMessage = "The prim with this scipt is ";
   if (llGetPos() != llGetRootPosition()){
     vStrMessage += "NOT ";
   }
   llSay( PUBLIC_CHANNEL, vStrMessage + "centered on the root prim." );
 }

}

</lsl>

便利なスニペット

<lsl> //-- there is no llSetLocalPos, this adds the functionality //-- to match llGetLocalPos() in a child prim fSetLocalPos( vector vPosOffset ){

 llSetPos( llGetRootPosition() + vPosOffset );

} //-- this will move a root prim by the offset, or set the //-- position of a child prim relative to the root. </lsl>

関連項目

関数

•  llGetLocalPos 子プリムの親プリムに対する相対的な位置を取得します
•  llGetPos プリムのグローバル位置を取得します
•  llSetPos プリムのグローバル位置を設定します

特記事項

Search JIRA for related Issues

Signature

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