Difference between revisions of "LlGetRootPosition/ja"
Jump to navigation
Jump to search
Mako Nozaki (talk | contribs) m (カテゴリ変更) |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 4: | Line 4: | ||
|func_footnote | |func_footnote | ||
|func_desc | |func_desc | ||
|return_text=スクリプトが添付されたプリムの親プリムの[[Viewer coordinate frames#Region|リージョン]]位置 | |return_text=スクリプトが添付されたプリムの親プリムの [[Viewer coordinate frames/ja#Region|リージョン]] 位置 | ||
|spec | |spec | ||
|caveats | |caveats | ||
|constants | |constants | ||
|examples= | |examples= | ||
< | <source lang="lsl2"> | ||
default{ | default{ | ||
touch_start( integer vIntTouched ){ | touch_start( integer vIntTouched ){ | ||
string vStrMessage = "The prim with this | string vStrMessage = "The prim with this script is "; | ||
if (llGetPos() != llGetRootPosition()){ | if (llGetPos() != llGetRootPosition()){ | ||
vStrMessage += "NOT "; | vStrMessage += "NOT "; | ||
Line 19: | Line 19: | ||
} | } | ||
} | } | ||
</ | </source> | ||
|helpers= | |helpers= | ||
< | <source lang="lsl2"> | ||
//-- | //-- llSetLocalPos は存在しません。これは関数の中で | ||
//-- | //-- 子プリムの llGetLocalPos() に対応するように足し算しています | ||
fSetLocalPos( vector vPosOffset ){ | fSetLocalPos( vector vPosOffset ){ | ||
llSetPos( llGetRootPosition() + vPosOffset ); | llSetPos( llGetRootPosition() + vPosOffset ); | ||
} | } | ||
//-- | //-- これはルートプリムをオフセットの分だけ動かしたり、 | ||
//-- | //-- ルートプリムに対する子プリムの位置を設定したりします。 | ||
</ | </source> | ||
|also_functions= | |also_functions= | ||
{{LSL DefineRow||[[llGetLocalPos/ja|llGetLocalPos]]|子プリムの親プリムに対する相対的な位置を取得します}} | {{LSL DefineRow||[[llGetLocalPos/ja|llGetLocalPos]]|子プリムの親プリムに対する相対的な位置を取得します}} | ||
Line 38: | Line 38: | ||
|also_articles | |also_articles | ||
|notes | |notes | ||
|cat1=Movement | |cat1=Movement | ||
|cat2 | |cat2=Prim | ||
|cat3 | |cat3 | ||
|cat4 | |cat4 | ||
}} | }} |
Latest revision as of 13:51, 25 February 2016
LSL ポータル | 関数 | イベント | 型 | 演算子 | 定数 | 実行制御 | スクリプトライブラリ | カテゴリ別スクリプトライブラリ | チュートリアル |
要約
関数: vector llGetRootPosition( );サンプル
default{
touch_start( integer vIntTouched ){
string vStrMessage = "The prim with this script is ";
if (llGetPos() != llGetRootPosition()){
vStrMessage += "NOT ";
}
llSay( PUBLIC_CHANNEL, vStrMessage + "centered on the root prim." );
}
}
便利なスニペット
//-- llSetLocalPos は存在しません。これは関数の中で
//-- 子プリムの llGetLocalPos() に対応するように足し算しています
fSetLocalPos( vector vPosOffset ){
llSetPos( llGetRootPosition() + vPosOffset );
}
//-- これはルートプリムをオフセットの分だけ動かしたり、
//-- ルートプリムに対する子プリムの位置を設定したりします。
関連項目
関数
• | llGetLocalPos | – | 子プリムの親プリムに対する相対的な位置を取得します | |
• | llGetPos | – | プリムのグローバル位置を取得します | |
• | llSetPos | – | プリムのグローバル位置を設定します |
特記事項
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。