Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Rotate part of an attachment

Amanita DeFarge
Registered User
Join date: 21 Jan 2005
Posts: 5
02-11-2005 13:47
Sorry if this is an obvious 'no', but I haven't been able to find the answer anywhere:
Basically what I want to know is if it's possible to rotate part of an attachment that consists of a number of linked prims? The part works (i.e. rotates) fine when the object is on the ground, but the whole thing freezes up if I attach it.
Hope this is possible, but if not maybe someone could let me know that?

Thanks,
Amanita
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
02-11-2005 14:24
Can't be done.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Upshaw Underhill
Techno-Hobbit
Join date: 13 Mar 2003
Posts: 293
02-11-2005 14:37
There are two other options however:

1> a rotating texture of what needs to spin (some even build it in-world, screen capture then photoshop it into whatever background or alpha they need)

2> if it's a non-humanoid AV you could build (or have made) an animation which uses a body part as a rotator. :D

L8r,
UU
Jeffrey Gomez
Cubed™
Join date: 11 Jun 2004
Posts: 3,522
02-11-2005 16:18
To add to the pot from several threads on the issue, you can also use several attachments and run a texture loop through them.

As a minor hijack, did I take your "Location" forum tag UU? I wasn't aware I'd been scooped. :rolleyes:
_____________________
---
Upshaw Underhill
Techno-Hobbit
Join date: 13 Mar 2003
Posts: 293
02-11-2005 18:11
heh, yep. It's been the same for quite a while now :)

I can share though I suppose :D

L8r,
UU
Amanita DeFarge
Registered User
Join date: 21 Jan 2005
Posts: 5
02-12-2005 02:14
From: Upshaw Underhill
There are two other options however:

1> a rotating texture of what needs to spin (some even build it in-world, screen capture then photoshop it into whatever background or alpha they need)


So would I rotate the texture with code? And that wouldn't be affected by whether the object was an attachment? Or am I coming at this from the wrong angle?

Thanks
Upshaw Underhill
Techno-Hobbit
Join date: 13 Mar 2003
Posts: 293
02-12-2005 12:13
Rotating textures works on attachments just fine.

Cut and paste this code into a script but create the script in your inventory rather than in the item. (Right-Click on a folder and click New Script.)

Once it is saved drag the script into the contents of the item.

CODE

default {
state_entry() {
llSetTextureAnim(ANIM_ON | SMOOTH | LOOP | ROTATE, ALL_SIDES, 0, 0, 0, TWO_PI, 0.5);
llRemoveInventory(llGetScriptName());
}
}


This animates the texture on all side of the prim, smoothly, in a looping rotation.
The ALL_SIDES can be replaced with a single texture face number.
The three zeros are because this is a rotating animation.
TWO_PI tells it to rotate the entire way around.
0.5 at the end is the rate at which it rotates.

I'm not able to get in-world right now so this is uncompiled,
but all of this info is pulled from The Wiki on llSetTextureAnim

The last line, llRemoveInventory, removes the script from the item to reduce lag.
Once the texture is animated it becomes a permanent feature of the prim so the script is no longer necesary.

If you want to be able to turn the rotation on and off you'll need a permanent script with a touch or listen or timer (or combination thereof) so get in touch with your favorite scripter or IM me, I'll be back once my gaming machine has a new HD :(

L8r,
UU