Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

How to rotate a stationary object via script?

Logan Proto
Registered User
Join date: 30 Aug 2008
Posts: 1
05-21-2009 22:51
I am a newbie and I need to know how to rotate an object about a specific axis. I am not animating an Avatar. Imagine a modern piece of art spinning in a lobby. Something like that. I create the shape and want objects to rotate. But what about linking? Can I apply the animation script to a specific object within a linked object? How does that work.
Thanks in advance.
Deira Llanfair
Deira to rhyme with Myra
Join date: 16 Oct 2006
Posts: 2,315
05-22-2009 03:17
Hi Logan, best post this on the scripting forum. I'm sure this can be done, but this forum is for avatar animation questions and you would get to the best people on the scripting forum.

If you look in the Library, at the bottom of your Inventory, I think there is a sample rotation script which might help. Also take a visit to the Particle Lab - and look at some of the rotating objects there. That might give you some ideas as to how you could achieve the desired effect.
_____________________
Deira :)
Must create animations for head-desk and palm-face!.
Ee Maculate
Owner of Fourmile Castle
Join date: 11 Jan 2007
Posts: 919
05-22-2009 03:31
Yes.... the script in the library called "Rotation Script" ;) Just drop it into the contents of your object and edit it if you need to change the axis or speed.

It uses

llTargetOmega(<0,0,1>,PI,1.0);

The first bit <0,0,1> is the axis to spin about, the second bit, PI in this case, is the speed, last one, 1.0, you won't need to change.

The scripting forum is the best place for questions like this... there are always people willing to give good advice, or as advised try the Particle Lab.
Ian Berensohn
Registered User
Join date: 15 May 2008
Posts: 35
09-30-2009 01:14
Re that PI which is the speed, use an numeric. 0.05 will give you a very slow rotation like a rotating table for a musician to sit on, etc :) 1.0 (or PI) will be rather quick.