LlSetLocalRot/ja: Difference between revisions
Jump to navigation
Jump to search
Mako Nozaki (talk | contribs) m Undo revision 850062 by Mako Nozaki (Talk) |
Mako Nozaki (talk | contribs) mNo edit summary |
||
| Line 8: | Line 8: | ||
|caveats | |caveats | ||
|constants | |constants | ||
|examples= | |examples=このスクリプトをプリム* に入れると、 1°ずつ回転していきます。*このプリムはルートプリムの子としてくっつけられなければなりません。 | ||
<lsl>rotation rot_xyzq; | <lsl>rotation rot_xyzq; | ||
| Line 15: | Line 15: | ||
state_entry() | state_entry() | ||
{ | { | ||
vector xyz_angles = <0,1.0,0>; // | vector xyz_angles = <0,1.0,0>; // これは変更 1° を定義しています | ||
vector angles_in_radians = xyz_angles*DEG_TO_RAD; // | vector angles_in_radians = xyz_angles*DEG_TO_RAD; // ラジアンに変換 | ||
rot_xyzq = llEuler2Rot(angles_in_radians); // | rot_xyzq = llEuler2Rot(angles_in_radians); // 回転に変換 | ||
} | } | ||
touch_start(integer s) | touch_start(integer s) | ||
{ | { | ||
llSetLocalRot(llGetRot()*rot_xyzq); // | llSetLocalRot(llGetRot()*rot_xyzq); //回転を実行します... | ||
} | } | ||
}</lsl> | }</lsl> | ||
|helpers | |helpers | ||
|also_functions={{LSL DefineRow|| | |also_functions={{LSL DefineRow||{{LSLG/ja|llSetRot}}|}} | ||
{{LSL DefineRow|| | {{LSL DefineRow||{{LSLG/ja|llGetRot}}|}} | ||
{{LSL DefineRow|| | {{LSL DefineRow||{{LSLG/ja|llGetLocalRot}}|}} | ||
{{LSL DefineRow|| | {{LSL DefineRow||{{LSLG/ja|llGetRootRotation}}|}} | ||
|also_tests | |also_tests | ||
|also_events | |also_events | ||
Revision as of 04:40, 9 May 2010
| LSL ポータル | 関数 | イベント | 型 | 演算子 | 定数 | 実行制御 | スクリプトライブラリ | カテゴリ別スクリプトライブラリ | チュートリアル |
要約
関数: llSetLocalRot( rotation rot );警告
- この関数は 0.2 秒間、スクリプトを停止します。
サンプル
このスクリプトをプリム* に入れると、 1°ずつ回転していきます。*このプリムはルートプリムの子としてくっつけられなければなりません。 <lsl>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); //回転を実行します...
}
}</lsl>
関連項目
関数
| • | llSetRot | |||
| • | llGetRot | |||
| • | llGetLocalRot | |||
| • | llGetRootRotation |
特記事項
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。