Advertisement
Guest User

Untitled

a guest
Dec 24th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. llOffsetTextureSmoothly(float x, float y, integer face, float time)
  2. {
  3.     vector start = llGetTextureOffset(face);
  4.     vector end = <x, y, 0>;
  5.     vector scale = llGetTextureScale(face); // If texture repeats never change, delete this line and hardcode the texture repeat vector instead. (will be faster)
  6.     float rot = llGetTextureRot(face); // If texture rotation never changes, delete this line and hardcode the texture rotation value instead. (will be faster)
  7.     integer i;
  8.     llResetTime();
  9.     while(llGetTime() < time)
  10.     {
  11.         llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_TEXTURE, ALL_SIDES, "9dcea2af-8364-9103-b489-14dd5054d9cf", scale, start+(end-start)*(llGetTime()*(1/time)), rot]);
  12.     }
  13.     llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_TEXTURE, ALL_SIDES, "9dcea2af-8364-9103-b489-14dd5054d9cf", scale, end, rot]);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement