Difference between revisions of "LlGetPos/ja"

From Second Life Wiki
Jump to navigation Jump to search
m (カテゴリ変更)
 
(3 intermediate revisions by 2 users not shown)
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=<source lang="lsl2">
default
default
{
{
     touch_start(integer total_number)
     touch_start(integer total_number)
     {
     {
         // When touched, check the position of
         // タッチされると、オブジェクトの位置をチェックし、
         // the object, save it to "position",
         // "position" に保存します。
        // then convert it into a string and
         // そしてそれを文字列にして発言します。
         // say it.
         vector position = llGetPos();
         vector position = llGetPos();
         llSay(0, (string)position);
         llSay(0, (string)position);
     }
     }
}
}</source><source lang="lsl2">
</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!");
    }
}</source>
|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 35: Line 44:
|also_articles
|also_articles
|notes
|notes
|cat1=Movement/ja
|cat1=Movement
|cat2=Prim/ja
|cat2=Prim
|cat3=Object/ja
|cat3
|cat4
|cat4
}}
}}

Latest revision as of 13:50, 25 February 2016

要約

関数: vector llGetPos( );

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

警告

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

サンプル

default
{
    touch_start(integer total_number)
    {
        // タッチされると、オブジェクトの位置をチェックし、
        // "position" に保存します。
        // そしてそれを文字列にして発言します。
        vector position = llGetPos();
        llSay(0, (string)position);
    }
}
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!");
    }
}

関連項目

関数

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

特記事項

Search JIRA for related Issues

Signature

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