Difference between revisions of "LlGetPos/ja"

From Second Life Wiki
Jump to navigation Jump to search
m (Undo revision 849932 by Mako Nozaki (Talk))
m ( )
Line 1: Line 1:
{{LSL_Function/ja
{{LSL_Function/ja
|func_id=59|func_sleep=0.0|func_energy=10.0
|func_id=59|func_sleep=0.0|func_energy=10.0
|func=llGetPos
|func=llGetPos|sort=GetPos
|return_type=vector
|return_type=vector
|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=<lsl>
|examples=<lsl>
Line 14: Line 14:
     touch_start(integer total_number)
     touch_start(integer total_number)
     {
     {
         // When touched, check the position of
         // タッチされると、オブジェクトの位置をチェックし、
         // the object, save it to "position",
        When touched, check the position of
        // then convert it into a string and
         // "position" に保存します。
         // say it.
         // そしてそれを文字列にして発言します。
         vector position = llGetPos();
         vector position = llGetPos();
         llSay(0, (string)position);
         llSay(0, (string)position);
     }
     }
}
}</lsl><lsl>
</lsl>
default
{
    on_rez(integer param)
    {
        // ベクトルの変数名の最後尾に .x .y or .z をつけるとその座標軸の浮動小数点数値として使用することができます。
        vector pos = llGetPos();
        float Z = pos.z; // <--- Like this.
        if(Z > 500.0)
        llOwnerSay("Oooh! I'm up high!");
    }
}</lsl>
|helpers
|helpers
|also_functions=
|also_functions=
{{LSL DefineRow||[[llGetRootPosition/ja|llGetRootPosition]]|ルートプリム位置を取得します。}}
{{LSL DefineRow||[[llGetRootPosition/ja|llGetRootPosition]]|ルートプリム位置を取得します。}}
{{LSL DefineRow||[[llGetLocalPos/ja|llGetLocalPos]]|プリムの[[Viewer coordinate frames#Local|ローカル]]位置を取得します。}}
{{LSL DefineRow||[[llGetLocalPos/ja|llGetLocalPos]]|プリムの [[Viewer coordinate frames#Local|ローカル]] 位置を取得します。}}
{{LSL DefineRow||[[llGetPrimitiveParams/ja|llGetPrimitiveParams]]|プリムのプロパティを取得します。}}
{{LSL DefineRow||[[llGetPrimitiveParams/ja|llGetPrimitiveParams]]|プリムのプロパティを取得します。}}
{{LSL DefineRow||[[llSetPos/ja|llSetPos]]|プリムの位置を設定します。}}
{{LSL DefineRow||[[llSetPos/ja|llSetPos]]|プリムの位置を設定します。}}
Line 37: Line 47:
|cat1=Movement
|cat1=Movement
|cat2=Prim
|cat2=Prim
|cat3=Object
|cat3
|cat4
|cat4
}}
}}

Revision as of 02:01, 4 May 2010

要約

関数: vector llGetPos( );

リージョン 座標で表されたタスクの位置を vector で返します。

警告

  • アタッチメントのルートから呼び出されると、装着者の位置が返ります。子プリムから呼ばれると、常にそのプリムのリージョン位置が返ります。
All Issues ~ Search JIRA for related Bugs

サンプル

<lsl> default {

   touch_start(integer total_number)
   {
       // タッチされると、オブジェクトの位置をチェックし、
       When touched, check the position of
       // "position" に保存します。
       // そしてそれを文字列にして発言します。
       vector position = llGetPos();
       llSay(0, (string)position);
   }

}</lsl><lsl> default {

   on_rez(integer param)
   {
       // ベクトルの変数名の最後尾に .x .y or .z をつけるとその座標軸の浮動小数点数値として使用することができます。
       vector pos = llGetPos();
       float Z = pos.z; // <--- Like this.
       if(Z > 500.0)
       llOwnerSay("Oooh! I'm up high!");
   }
}</lsl>

関連項目

関数

•  llGetRootPosition ルートプリム位置を取得します。
•  llGetLocalPos プリムの ローカル 位置を取得します。
•  llGetPrimitiveParams プリムのプロパティを取得します。
•  llSetPos プリムの位置を設定します。
•  llSetPrimitiveParams プリムのプロパティを設定します。
•  llSetLinkPrimitiveParams リンクされたプリムのプロパティを設定します。

特記事項

Search JIRA for related Issues

Signature

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