Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Rotating a spiraled torus around a staff

Drizzt Naumova
Teh Foxeh DJ
Join date: 9 Oct 2005
Posts: 116
01-13-2006 07:45
Greetings..i am making a staff amd have made a spiraled torus..problem is....i need the spiraled torus to "spiral" around the staff...Rotate in place if you will..around the staff. I have an llGetRotation script, but it isn't working correctly. I have provided a snap of the staff to give you an idea of what i am talking about :) If anyone would know of or have any open source scripts available, would greatly appreciate it :)

Thanxx in advance :)
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
01-13-2006 08:59
Is the staff in the centre of the torus?

If so, I think all you need is a single call to llTargetOmega.
Vlad Bjornson
Virtual Gardener
Join date: 11 Nov 2005
Posts: 650
01-13-2006 09:47
Try something like this....

default
{
state_entry()
{
llTargetOmega(<0,0,1>, 1, 1);
}
}

That should make an object rotate around the Z-Axis. If your object is linked to something, it should rotate around the center of the Parent object. If the linked object is rotated at all you'll prolly get some funky rotations.

Here's a link to the ScriptWiki entry for llTargerOmega. There's some info there about rotating around an already rotated Prim, to.
http://secondlife.com/badgeo/wakka.php?wakka=llTargetOmega
Drizzt Naumova
Teh Foxeh DJ
Join date: 9 Oct 2005
Posts: 116
01-14-2006 08:57
Thanxx.
Just what i was looking for :)
Will do nicely. Thanxx for the reply guys :)
Frans Charming
You only need one Frans
Join date: 28 Jan 2005
Posts: 1,847
01-14-2006 09:47
I have experienced some wierdness with llTargetOmega() in a child prim in the past , it stopped rotation after it was taken in the inventory and rerezzed. If you have that problem aswell you might try to put that call in the on_rez() event. :)
_____________________