Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Animated Textures and the Torus

Infrared Wind
Gridologist
Join date: 7 Jan 2007
Posts: 662
03-04-2009 22:43
Quite simply I'm try to get an animated tire texture to rotate on the outside of a torus (in this case just a donut shape). The result I'm getting so far is that the texture will rotate from the inside of the torus to the outside. What I want is the texture to rotate radially. I'm not sure this is even possible.

Any comments appreciated.

- IW
_____________________
Osprey Therian
I want capslocklock
Join date: 6 Jul 2004
Posts: 5,049
03-04-2009 23:09
I just threw a common old anim smooth script in a torus and it goes around and around like a moving wheel.

// anim SMOOTH Script
// By Doug Linden (I think)
//

// If you are interested in scripting, check out
// the Script Help under the help menu.

// The double slash means these lines are comments
// and ignored by the computer.

// All scripts have a default state, this will be
// the first code executed.
default
{
// state_entry() is an event handler, it executes
// whenever a state is entered.
state_entry()
{
// llSetTextureAnim() is a function that animates a texture on a face.
llSetTextureAnim(ANIM_ON | SMOOTH | LOOP, ALL_SIDES,1,1,1.0, 1,0.25);
// animate the script to scroll across all the faces.
}


}

I'm sure I'm missing someting, though, but for what it's worth there's the script. Texture rotation was -90. If it's 0 it does do the from-the-middle looping.
Rainbow Shelman
Registered User
Join date: 4 Dec 2008
Posts: 7
03-05-2009 01:42
Rotating the texture by 90 degrees should do it
Infrared Wind
Gridologist
Join date: 7 Jan 2007
Posts: 662
03-05-2009 06:37
Awesome you guys. Both tips are what I needed.

My tire texture originally was a 512x512 square with the tread
running vertical. Setting rotation in SL to 90 didn't help.

I had to recreate the texture in Photoshop to reorient the treads to
horizontal. And then the 90 degree setting worked.

Thanks!!
_____________________