Difference between revisions of "LlRotateTexture"

From Second Life Wiki
Jump to navigation Jump to search
(adding example)
Line 11: Line 11:
|caveats
|caveats
|constants
|constants
|examples
|examples=<pre>
default
{
    touch_start(integer total_number) {
        // Makes the object's texture rotate a quarter of turn
        llRotateTexture(PI_BY_TWO, ALL_SIDES);
    }
}
</pre>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llGetTextureRot]]|Gets the texture rotation}}
|also_functions={{LSL DefineRow||[[llGetTextureRot]]|Gets the texture rotation}}
{{LSL DefineRow||[[llSetTextureAnim]]|Animates the texture}}
|also_tests
|also_tests
|also_events
|also_events
|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.
|cat1=Face
|cat1=Face
|cat2=Texture
|cat2=Texture

Revision as of 06:04, 2 September 2007

Summary

Function: llRotateTexture( float rotation, integer face );

Sets the texture rotation for the chosen face

• float rotation angle 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.
All Issues ~ Search JIRA for related Bugs

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

Search JIRA for related Issues

Signature

function void llRotateTexture( float rotation, integer face );