Hi, you need to research manual about uv shifting.
From vec_for_uv (VECTOR*, ENTITY*, var number);
vec_to_uv (VECTOR*, ENTITY*, var number);
function shiftskin(ent,num) // displace the skin position of a vertex{
vec_for_uv(temp,ent,num);
temp.x += 1; // move the skin coordinate by 1 pixel horizontally
vec_to_uv(temp,ent,num);
}
Found another;u, v
u
v
The pixel offsets of sprite and A7.07 model textures in horizontal and vertical direction. They affect the matTexture texture transformation matrix. By changing these offsets in real time, effects like streaming water can be achieved.
Range:
unlimited (default: 0)
Type:
var
Remarks:
The texture offsets of model or terrain skins can also be changed through the fx_uvspeed action in the MtlFX template script.
On sky domes the u v parameters give the speed of the cloud layers in pixels per tick.
Example:
action water_current // assign to a water sprite
{
while (1) {
my.v = 5*total_ticks;
wait (1);
}
}
See
Last edited by KiwiBoy; 05/14/09 07:17. Reason: added info