Easy Object Rotation

Date 2008/4/1 8:08:54 | Topic: Primitive/Object

Object rotation with speed and direction settings you can easily adjust to get your desired effect.

//////////CHANGE THESE SETTINGS////////////////////
string speed "NORMAL"//"VERY SLOW", "SLOW", "NORMAL", "FAST", "VERY FAST"
string direction "FORWARD"//"FORWARD", "REVERSE"
////////////////END SETTINGS///////////////////////

default
{
    
state_entry()
    {
        
vector speedvector = <0,0,0.6>;
        if (
speed == "VERY SLOW")
        {
           
speedvector = <0,0,0.15>;
        }
        else if (
speed == "SLOW")
        {
           
speedvector = <0,0,0.3>;
        }
        else if (
speed == "NORMAL")
        {
           
speedvector = <0,0,0.6>;
        }
        else if (
speed == "FAST")
        {
           
speedvector = <0,0,1>;
        }
        else if (
speed == "VERY FAST")
        {
           
speedvector = <0,0,5>;
        }
        if (
direction == "REVERSE")
        {
            
speedvector.*= -1;
        }
        
llOwnerSay("Object is rotating " direction " " speed ".");
        
llTargetOmega(speedvector,PI,1.0);
    }
}




This script comes from Alicia Stella Design - Best Tip Jars in Second Life
http://www.aliciastella.com

The URL for this script is:
http://www.aliciastella.com/modules/AMS/article.php?storyid=13