LlOffsetTexture

From Second Life Wiki

Jump to: navigation, search

Template:Needs Translation/LSL/de Template:Needs Translation/LSL/es Template:Needs Translation/LSL/el Template:Needs Translation/LSL/he Template:Needs Translation/LSL/it Template:Needs Translation/LSL/ko Template:Needs Translation/LSL/nl Template:Needs Translation/LSL/hu Template:Needs Translation/LSL/no Template:Needs Translation/LSL/da Template:Needs Translation/LSL/sv Template:Needs Translation/LSL/tr Template:Needs Translation/LSL/pl Template:Needs Translation/LSL/pt Template:Needs Translation/LSL/ru Template:Needs Translation/LSL/uk Template:Needs Translation/LSL/zh-Hans Template:Needs Translation/LSL/zh-Hant

Contents

Summary

Function: llOffsetTexture( float u, float v, integer face );
55 Function ID
0.2 Delay
10.0 Energy

Sets the texture u & v offsets for the chosen face.

• float u horizontal (x) offset (between -1.0 and 1.0)
• float v vertical (y) offset (between -1.0 and 1.0)
• 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.

Search JIRA for related Bugs

Examples

 
//Offsets the textures on 6 sides
float offset;
default
{
    state_entry()
    {
        integer i;
 
        for( i = 1; i < 7; i++ )
        {
            offset = offset + .1;
            llOffsetTexture( (float)offset, (float)offset, i);
        }
    }
}
 

Notes

If you use vector offsetVec = llGetTextureOffset() to get the vector of the current offset, then u = offsetVec.x and v = offsetVec.y

See Also

Functions

•  llGetTextureOffset Returns a vector in the form <u, v, 0.0>

Deep Notes

This article wasn't helpful for you? Maybe the related article at the LSL Wiki is able to bring enlightenment.
In other languages