Don't click here unless you want to be banned.

LSL Wiki : llGetAccel

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are
vector llGetAccel()

Returns the current acceleration (in m/s²) exhibited by an object.

Example: If you create a cube, check its physics checkbox, and drop it from a height, it will initially return <0,0,-9.8> (the value for gravity in SL) while falling. This value will decrease, because some funky wind resistance seems to be at work to allow falling objects to achieve terminal velocity.

Compare with: llGetVel

This function does not actually return the acceleration on the object. It generally returns (llGetForce()/llGetMass())+<0,0,-9.8>, unless the object is at rest in which case it returns <0,0,0>.

To get the actual acceleration, you need to keep track of velocity and measure its changes.

Try putting the following script into an object.

        llSetStatus(STATUS_PHYSICS, TRUE);
        llSetForce(<1,2,llGetMass()*1>, FALSE);
            "llGetAccel()="+(string)llGetAccel() + "\n" +
            "llGetForce()="+(string)llGetForce() + "\n" +
            "Force/Mass=  "+(string)(llGetForce()/llGetMass()), <1,1,1>, 1);


This article wasn't helpful for you? Maybe the related article at the LSL Portal is able to bring enlightenment.

Functions | Dynamics
There are 3 comments on this page. [Display comments/form]