Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llSetTextureAnim PING_PONG not working

Geuis Dassin
Filming Path creator
Join date: 3 May 2006
Posts: 565
06-05-2006 15:20
Using this code

CODE

llSetTextureAnim(ANIM_ON|PING_PONG|LOOP,ALL_SIDES,1,1,0,1,-1.1);


to try and get a texture on a cylinder to go back and forth. If I change PING_PONG to smooth, I get animation and it loops around the cylinder. If I use the code as above, I don't get anything. Texture just sits there.

What do I need to change?
Anti Antonelli
Deranged Toymaker
Join date: 25 Apr 2006
Posts: 1,091
06-05-2006 15:45
I don't think there's a way to get the texture to smoothly move back and forth with just llSetTextureAnim, and based on your code it looks like that's what you want. PING_PONG is for when you have a texture broken up into discrete frames and the texture jumps between them "slideshow" style, and PING_PONG merely changes the order of the frames every cycle so they go back and forth.

You might be able to get the effect you want by starting a SMOOTH animation and then flipping the texture alignment 180 degrees with llRotateTexture or llSetPrimitiveParams on a timer. EDIT: now that I think about it, I believe llSetTextureAnim is client-side so this probably wouldn't work after all.

Apologies if I misunderstod your intent. If you in fact have a texture with a bunch of frames, you need to specify the number of columns/number of rows/number of frames to use with the parameters there.
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
06-05-2006 18:04
I think PING_PONG and LOOP are mutually exclusive.
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
06-05-2006 18:21
CODE

llSetTextureAnim(ANIM_ON | SMOOTH | PING_PONG | LOOP, ALL_SIDES,1,1,0.0,0.0,0.5);


What was forgotten was the SMOOTH flag, this sets us with the no-frame animation which slides the texture left to right, together with PING_PONG and LOOP this will then slide back and loop.

Doesn't work without LOOP though.