Skip to content
lsl.devlsl.devLSL Dev

llSetAngularVelocity

function
Function syntax
llSetAngularVelocity(
  1. vector initial_omega,// Angular velocity vector to apply (in radians per second).
  2. integer is_local// Boolean. If TRUE, initial_omega is treated as a local vector; if FALSE, as a global region vector.
);
Energy
10

Sets the angular velocity of a physical object to initial_omega (mass-independent). If local is TRUE, applied in local coordinates; if FALSE, applied in global coordinates. Has no effect on non-physical objects.

Applies rotational velocity to object.

It does the same job as llApplyRotationalImpulse but doesn’t depend of the mass of object .

How to use
llSetAngularVelocity(ZERO_VECTOR, 0);

Instances :

one regular cube with mass M , and gravity 0 ( to disable the gravity) ; the object is homogenous and with only one prim so, its center of mass is its center of the object and its physical axis of rotation are its local axis :

<ul>

<li>LlSetAngularVelocity(<0,0,1>, TRUE ) => starts to rotate around its Z local axis with a start value of omega = 1 radian /second , and slows down over time until it won’t rotate </li>

<li>llApplyRotationalImpulse(<0,0,1>, TRUE ) => starts to rotate around its Z local axis with a start value of omega = 1/M radian /second , and slows down over time until it won’t rotate</li>

<li>llTargetOmega(<0.0,0.0,1.0>, 1.0, 1.0) => if the object is physical , starts to rotate around its Z local axis with a start value of omega = 1 radian / second . It won t slow down over time </li>

</ul>

Date of Release 10/08/2011

Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.