Difference between revisions of "LlRotateTexture"

From Second Life Wiki
Jump to navigation Jump to search
(I take it the problem was that the wording didn't make it obvious exactly what the value was used for. That is failing of the description.)
m (<lsl> tag to <source>)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{LSL_Function/face|face}}
{{LSL_Function
{{LSL_Function
|inject-2={{LSL_Function/face|face}}
{{LSL_Function/angle|angle}}
|func_id=56|func_sleep=0.2|func_energy=10.0
|func_id=56|func_sleep=0.2|func_energy=10.0
|func=llRotateTexture
|func=llRotateTexture
|p1_type=float|p1_name=angle|p1_desc=measured in [[radians]]
|p1_type=float|p1_name=angle
|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 '''face''' to '''angle'''
|func_desc=Sets the texture rotation of the chosen {{LSLP|face}} to {{LSLP|angle}}.
|return_text
|return_text
|spec
|spec
|caveats
|caveats
|constants
|constants
|examples=<lsl>
|examples=<source lang="lsl2">
default
default
{
{
Line 19: Line 20:
     }
     }
}
}
</lsl>
</source>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llGetTextureRot]]|Gets the texture rotation}}
|also_functions={{LSL DefineRow||[[llGetTextureRot]]|Gets the texture rotation}}

Latest revision as of 13:38, 22 January 2015

Summary

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

Sets the texture rotation of 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 applies once on the actual orientation of the texture. It is not an animation. 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 );