Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llSetTextureAnim: view only a portion of the texture at a time

Daryn Writer
Registered User
Join date: 5 May 2007
Posts: 3
10-20-2007 07:34
I have a very long texture for an object. I wish to animate the texture such that only a portion of the texture is visible at any one time. So for example the surface of the object shows only 10% of the texture, and over time the entire texture passes through that 10% window.

I thought from reading the documentation that the answer is to use llSetTextureAnim, and use the frame settings to break the texture into chunks. So if I set the x-frame value to 10 and the y-frame to 1, then I should have 10 frames and I will only see 10% of the texture at a time.

But as far as I can see this has no effect at all. At all times I see the entire texture on the surface of the object, and the entire texture moves along it. So, what am I doing wrong? How do I do this?

Thanks
AlexAlex Yifu
Registered User
Join date: 2 Jun 2007
Posts: 17
10-20-2007 08:03
llSetTextureAnim( ANIM_ON | LOOP, ALL_SIDES, 1, 10, 0, 10, 1 );

Should do the trick... The 2nd 10 is the total number of pictures that you want shown...
Eristic Strangelove
Registered User
Join date: 16 Nov 2005
Posts: 39
Can it be random?
11-27-2007 06:25
This is something I need to do also - but I'd like to have a random 'frame' or section shown each time. Is it possible to introduce a random element to this type of script?

Randomising either the frame number displayed or the time taken between each change would work for me, whichever is easier. FYI, I'm trying to fake a LCD temperature display on a device - so that it would appear like the temperature was varying slightly over time.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
11-27-2007 06:58
using that function? no randomness... it can play forward back or 'ping-pong' between the ends though....

there are other ways to animated a framed sequence randomly, by using the texture offsets and scale, and setting them dynamicly, but they won't be as smooth or fast
_____________________
|
| . "Cat-Like Typing Detected"
| . This post may contain errors in logic, spelling, and
| . grammar known to the SL populace to cause confusion
|
| - Please Use PHP tags when posting scripts/code, Thanks.
| - Can't See PHP or URL Tags Correctly? Check Out This Link...
| -