vector llGetVel()
Returns the current
velocity of an
object in
meters/second, relative to the
simulator axes.
To find the velocity relative to the direction the object is pointing, try this:
vector global_velocity = llGetVel();
vector local_velocity = global_velocity / llGetRot();
Q: How would one go about calculating the actual speed of an object as a float?
A: Calculate the length (or magnitude) of the velocity vector with llVecMag(llGetVel()).
This article wasn't helpful for you? Maybe the
related article at the LSL Portal is able to bring enlightenment.
Functions |
Dynamics |
Physics