Skip to content
lsl.devlsl.devLSL Dev

llOffsetTexture

function
Function syntax
llOffsetTexture(
  1. float u,// Horizontal (U) offset, typically in the interval [-1.0, 1.0].
  2. float v,// Vertical (V) offset, typically in the interval [-1.0, 1.0].
  3. integer face// Face number or ALL_SIDES. Values: Faces
);
Delay
0.2 s
Energy
10

Sets the texture horizontal (u) and vertical (v) offsets for the chosen face. If face is ALL_SIDES, offsets all faces.

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

How to use
llOffsetTexture(0.0, 0.0, 0);
Example 1
//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);
}
}
}

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

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.