constant
Constant
integer PRIM_OMEGA = 32;Prim parameter to get, set, or disable a client-side physical-like rotation (analogous to llTargetOmega).
vector axis – arbitrary axis to rotate the object around
float spinrate – rate of rotation in radians per second
float gain – also modulates the final spinrate and disables the rotation behavior if zero
Constant groups
Other PrimParam values (42)
PRIM_ALLOW_UNSIT39PRIM_ALPHA_MODE38PRIM_BUMP_SHINY19PRIM_CLICK_ACTION43PRIM_COLLISION_SOUND53PRIM_COLOR18PRIM_DAMAGE51PRIM_DESC28PRIM_FLEXIBLE21PRIM_FULLBRIGHT20PRIM_GLOW25PRIM_GLTF_BASE_COLOR48PRIM_GLTF_EMISSIVE46PRIM_GLTF_METALLIC_ROUGHNESS47PRIM_GLTF_NORMAL45PRIM_HEALTH52PRIM_LINK_TARGET34PRIM_MATERIAL2PRIM_NAME27PRIM_NORMAL37PRIM_PHANTOM5PRIM_PHYSICS3PRIM_PHYSICS_SHAPE_TYPE30PRIM_POINT_LIGHT23PRIM_POS_LOCAL33PRIM_POSITION6PRIM_PROJECTOR42PRIM_REFLECTION_PROBE44PRIM_RENDER_MATERIAL49PRIM_ROT_LOCAL29PRIM_ROTATION8PRIM_SCRIPTED_SIT_ONLY40PRIM_SIT_FLAGS50PRIM_SIT_TARGET41PRIM_SIZE7PRIM_SLICE35PRIM_SPECULAR36PRIM_TEMP_ON_REZ4PRIM_TEXGEN22PRIM_TEXT26PRIM_TEXTURE17PRIM_TYPE9
Other PrimParamGet values (40)
PRIM_ALLOW_UNSIT39PRIM_ALPHA_MODE38PRIM_BUMP_SHINY19PRIM_CLICK_ACTION43PRIM_COLLISION_SOUND53PRIM_COLOR18PRIM_DAMAGE51PRIM_DESC28PRIM_FLEXIBLE21PRIM_FULLBRIGHT20PRIM_GLOW25PRIM_GLTF_BASE_COLOR48PRIM_GLTF_EMISSIVE46PRIM_GLTF_METALLIC_ROUGHNESS47PRIM_GLTF_NORMAL45PRIM_HEALTH52PRIM_MATERIAL2PRIM_NAME27PRIM_NORMAL37PRIM_PHANTOM5PRIM_PHYSICS3PRIM_PHYSICS_SHAPE_TYPE30PRIM_POINT_LIGHT23PRIM_POS_LOCAL33PRIM_POSITION6PRIM_REFLECTION_PROBE44PRIM_RENDER_MATERIAL49PRIM_ROT_LOCAL29PRIM_ROTATION8PRIM_SCRIPTED_SIT_ONLY40PRIM_SIT_FLAGS50PRIM_SIT_TARGET41PRIM_SIZE7PRIM_SLICE35PRIM_SPECULAR36PRIM_TEMP_ON_REZ4PRIM_TEXGEN22PRIM_TEXT26PRIM_TEXTURE17PRIM_TYPE9
Used to make the object spin at the specified axis and rate, or retrieve spin settings. See llTargetOmega for specification.
Caveats
Section titled “Caveats”PRIM_OMEGAon nonphysical objects, and child prims of physical objects, is only a client side effect; the object or prim will collide as non-moving geometry.PRIM_OMEGAcannot be used on avatars sitting on the object. It will emit the error message “PRIM_OMEGAdisallowed on agent”.- If
PRIM_OMEGAdoes not appear to be working, make sure that that Develop > Network > Velocity Interpolate Objects is enabled on the viewer. - In the parameters returned by
llGetPrimitiveParams([PRIM_OMEGA]), the vector is normalized, and the spinrate is multiplied by the magnitude of the original vector.
Examples
Section titled “Examples”Example 1
// Set this prim rotatingllTargetOmega(<1.0,3.0,0.5>, TWO_PI, 1.0);
// Read back this prim's current target omegalist current_omega = llGetPrimitiveParams([PRIM_OMEGA]); // returns [axis, spinrate, gain]vector axis = llList2Vector(current_omega, 0); // Should be llVecNorm(<1.0,3.0,0.5>)float spinrate = llList2Float(current_omega, 1); // Should be TWO_PI*llVecMag(<1.0,3.0,0.5>)float gain = llList2Float(current_omega, 2); // Should be 1.0
// Set all child prims rotatingllSetLinkPrimitiveParamsFast(LINK_ALL_CHILDREN, [PRIM_OMEGA, <1.0,3.0,0.5>, TWO_PI, 1.0]);Also, can use llSetPrimitiveParams for the root prim.
7 collapsed lines
// will need two prims linked together for this script.default{ state_entry() { // make some sort of rotation angle for the omega... vector rotationAngle = <2.3, 5.5, 9.7> * llTan(85);
// rotate the main prim slowly using the same rotataion angle, rate, and gain... llSetPrimitiveParams([ PRIM_OMEGA, rotationAngle * 0.3, 1.0, 1.0 ]);
// rotate the link satellite prim separately around its own axis // it will rotate also around the main prim because the main prim is rotating. llSetLinkPrimitiveParams(2, [ PRIM_OMEGA, rotationAngle, 1.0, 1.0 ]); }}History
Section titled “History”- Introduced in Second Life RC BlueSteel 11.06.20.233291, June 22, 2011
- Rolled to main server channel the week of 7/11/2011
See also
Section titled “See also”Functions
Section titled “Functions”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.