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.
Example:
This article wasn't helpful for you? Maybe the
related article at the LSL Portal is able to bring enlightenment.
Functions |
Dynamics