Difference between revisions of "LlGetRootRotation/ja"

From Second Life Wiki
Jump to navigation Jump to search
(New page: {{LSL_Function/ja |func_id=269|func_sleep=0.0|func_energy=10.0 |func=llGetRootRotation|return_type=rotation |func_footnote |func_desc |return_text=スクリプトがアタッチされた...)
 
 
(4 intermediate revisions by 2 users 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
{
  state_entry()
  {
    // Y 軸について 45° 回転させる
    rotation globalRot = llEuler2Rot(<0.0, 45.0, 0.0> * DEG_TO_RAD);
    llSetLocalRot(globalRot / llGetRootRotation());
  }
}
</source>
|helpers
|helpers
|also_functions=
|also_functions=
Line 16: Line 28:
|also_tests
|also_tests
|also_articles
|also_articles
|notes
|notes=装着されたオブジェクトの中では、アバターのリージョン回転が返却され、オブジェクトのルートプリムの回転は返却されません。 [[Rotation#Single_or_Root_Prims_vs_Linked_Prims_vs_Attachments|special cases of rotation]] を参照してください。
|permission
|permission
|negative_index
|negative_index
|cat1=Movement
|cat1=Movement
|cat2=Rotation
|cat2=Rotation
|cat3
|cat3=Prim
|cat4
|cat4
}}
}}

Latest revision as of 13:51, 25 February 2016

要約

関数: rotation llGetRootRotation( );

オブジェクトのルートプリムの リージョン 回転を rotation で返します。

サンプル

装着されていないリンクセットの中にある子プリムのリージョン回転を設定するシンプルなサンプルです

default
{
  state_entry()
  {
    // Y 軸について 45° 回転させる
    rotation globalRot = llEuler2Rot(<0.0, 45.0, 0.0> * DEG_TO_RAD);
    llSetLocalRot(globalRot / llGetRootRotation());
  }
}

注意点

装着されたオブジェクトの中では、アバターのリージョン回転が返却され、オブジェクトのルートプリムの回転は返却されません。 special cases of rotation を参照してください。

関連項目

関数

•  llGetLocalRot
•  llGetRot

特記事項

Search JIRA for related Issues

Signature

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