LlRotateTexture: Difference between revisions

From Second Life Wiki
Jump to navigation Jump to search
m <lsl> tag to <source>
Wulfie Reanimator (talk | contribs)
m Rewording
 
Line 7: Line 7:
|p2_type=integer|p2_name=face
|p2_type=integer|p2_name=face
|func_footnote
|func_footnote
|func_desc=Sets the texture rotation of the chosen {{LSLP|face}} to {{LSLP|angle}}.
|func_desc=Sets the rotation of a texture on the chosen {{LSLP|face}} to {{LSLP|angle}}.
|return_text
|return_text
|spec
|spec
Line 28: Line 28:
|also_articles
|also_articles
|notes=
|notes=
This function applies once on the actual orientation of the texture. It is not an animation. See [[llSetTextureAnim]] for animations.  
This function only sets the absolute orientation of the texture. See [[llSetTextureAnim]] for animations.
|cat1=Face
|cat1=Face
|cat2=Texture
|cat2=Texture

Latest revision as of 03:44, 1 April 2025

Summary

Function: llRotateTexture( float angle, integer face );
0.2 Forced Delay
10.0 Energy

Sets the rotation of a texture on the chosen face to angle.

• float angle angle expressed in radians
• integer face face number or ALL_SIDES

If face is ALL_SIDES then the function works on all sides.

Caveats

  • This function causes the script to sleep for 0.2 seconds.
  • The function silently fails if its face value indicates a face that does not exist.

Examples

default
{
    touch_start(integer total_number) {
        // Makes the object's texture rotate a quarter of turn
        llRotateTexture(PI_BY_TWO, ALL_SIDES);
    }
}

Notes

This function only sets the absolute orientation of the texture. See llSetTextureAnim for animations.

See Also

Functions

•  llGetTextureRot Gets the texture rotation
•  llSetTextureAnim Animates the texture

Deep Notes

Signature

function void llRotateTexture( float angle, integer face );