LSL Wiki Mirror 7-7-7 : llGetVel

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings ::
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()).


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