LlApplyImpulse/ja - Second Life Wiki

LlApplyImpulse/ja

From Second Life Wiki

メインページ > LlApplyImpulse > LlApplyImpulse/ja
Jump to: navigation, search

関数: llApplyImpulse( vector force, integer local );

オブジェクトに衝撃を加えます。

• vector force
• integer local 真偽値がTRUEの場合、forceリージョン方向ベクトルの代わりにローカル方向ベクトルとして扱われます。

瞬間的な衝撃です。llSetForceは持続的な押し込みです。

警告

  • オブジェクトは物理にすべきです。

 
//Rez an object, and drop this script in it.
//This will launch it at the owner.
default {
     state_entry() {
          list p = llGetObjectDetails(llGetOwner(), [OBJECT_POS]);
          if(p != []) {
              llSetStatus(STATUS_PHYSICS, TRUE);
              vector pos = llList2Vector(p, 0);
              vector direction = llVecNorm(pos - llGetPos());
              llApplyImpulse(direction * 100, 0);
          }
     }
}
 

関連項目

関数

•  llApplyRotationalImpulse
•  llSetForce 持続的な力を設定します
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。