Difference between revisions of "LlGetAccel/ja"

From Second Life Wiki
Jump to navigation Jump to search
Line 14: Line 14:
//If you ever want to actually stop an object, use llMoveToTarget(llGetPos(), .1)
//If you ever want to actually stop an object, use llMoveToTarget(llGetPos(), .1)
default {
default {
    state_entry() {
    moving_start(){  
          vector ac;
        vector ac;
          while(llVecMag(ac = llGetAccel()) > .001) { //We're accelerating...
        // Go forever       
              llApplyImpulse(-ac, 0); //Slow us down.
        while(llVecMag(ac = llGetAccel()) > .001) { //We're accelerating...
          }
            llApplyImpulse(-ac, 0); //Slow us down.
    }
        }
    }
}</lsl>
}</lsl>
|helpers
|helpers

Revision as of 03:08, 9 March 2008

要約

関数: vector llGetAccel( );

リージョン参照座標内にあるオブジェクトの加速度を vector で返します。

サンプル

<lsl> //A very simple (and not very effective) way of keeping a physical object in place. //If the object is moving when the script is put in the object, then the object will continue to move, so long as it doesn't accelerate. //If you ever want to actually stop an object, use llMoveToTarget(llGetPos(), .1) default {

   moving_start(){ 
       vector ac;
       // Go forever         
       while(llVecMag(ac = llGetAccel()) > .001) { //We're accelerating...
           llApplyImpulse(-ac, 0); //Slow us down.
       }
   }
}</lsl>

関連項目

関数

•  llGetOmega
•  llGetVel
•  llGetTorque
•  llGetMass
•  llGetForce
•  llSetForce
•  llSetTorque
•  llSetForceAndTorque

特記事項

Search JIRA for related Issues

Signature

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