Difference between revisions of "LlSetLocalRot/ja"

From Second Life Wiki
Jump to navigation Jump to search
m (カテゴリ変更)
 
(2 intermediate revisions by one other user not shown)
Line 8: Line 8:
|caveats
|caveats
|constants
|constants
|examples=1°ずつ回転させるプリムにこのスクリプトをドロップします。*このプリムはルートプリムの子としてアタッチされるべきです。
|examples=このスクリプトをプリム* に入れると、 1°ずつ回転していきます。*このプリムはルートプリムの子としてくっつけられなければなりません。
<lsl>rotation rot_xyzq;
<source lang="lsl2">rotation rot_xyzq;
   
   
default
default
Line 15: Line 15:
     state_entry()
     state_entry()
     {
     {
         vector xyz_angles = <0,1.0,0>; // This is to define a 1 degree change
         vector xyz_angles = <0,1.0,0>; // これは変更 1° を定義しています
         vector angles_in_radians = xyz_angles*DEG_TO_RAD; // Change to Radians
         vector angles_in_radians = xyz_angles*DEG_TO_RAD; // ラジアンに変換
         rot_xyzq = llEuler2Rot(angles_in_radians); // Change to a Rotation
         rot_xyzq = llEuler2Rot(angles_in_radians); // 回転に変換
     }
     }
   
   
     touch_start(integer s)
     touch_start(integer s)
     {
     {
         llSetLocalRot(llGetRot()*rot_xyzq); //Do the Rotation...
         llSetLocalRot(llGetRot()*rot_xyzq); //回転を実行します...
   
   
     }
     }
}</lsl>
}</source>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llSetRot/ja|llSetRot]]|}}
|also_functions={{LSL DefineRow||{{LSLG/ja|llSetRot}}|}}
{{LSL DefineRow||[[llGetRot/ja|llGetRot]]|}}
{{LSL DefineRow||{{LSLG/ja|llGetRot}}|}}
{{LSL DefineRow||[[llGetLocalRot/ja|llGetLocalRot]]|}}
{{LSL DefineRow||{{LSLG/ja|llGetLocalRot}}|}}
{{LSL DefineRow||[[llGetRootRotation/ja|llGetRootRotation]]|}}
{{LSL DefineRow||{{LSLG/ja|llGetRootRotation}}|}}
|also_tests
|also_tests
|also_events
|also_events
|also_articles
|also_articles
|notes
|notes
|cat1=Movement/ja
|cat1=Movement
|cat2=Rotation/ja
|cat2=Rotation
|cat3
|cat3
|cat4
|cat4
}}
}}

Latest revision as of 14:17, 25 February 2016

要約

関数: llSetLocalRot( rotation rot );

ルートプリムに相対的な、子プリムの回転を設定します。

• rotation rot

警告

  • この関数は 0.2 秒間、スクリプトを停止します。
All Issues ~ Search JIRA for related Bugs

サンプル

このスクリプトをプリム* に入れると、 1°ずつ回転していきます。*このプリムはルートプリムの子としてくっつけられなければなりません。

rotation rot_xyzq;
 
default
{
    state_entry()
    {
        vector xyz_angles = <0,1.0,0>; // これは変更 1° を定義しています
        vector angles_in_radians = xyz_angles*DEG_TO_RAD; // ラジアンに変換
        rot_xyzq = llEuler2Rot(angles_in_radians); // 回転に変換
    }
 
    touch_start(integer s)
    {
        llSetLocalRot(llGetRot()*rot_xyzq); //回転を実行します...
 
    }
}

関連項目

関数

•  llSetRot
•  llGetRot
•  llGetLocalRot
•  llGetRootRotation

特記事項

Search JIRA for related Issues

Signature

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