Jump to content
You are about to reply to a thread that has been inactive for 1161 days.

Please take a moment to consider if this thread is worth bumping.

Question

Hello! Help please who can! I need to make the object (of a supposedly cylindrical shape) to rotate at an angle of 45 degrees to the root about a constant fixed axis. As if it were a globe on a stand.
Should I use this script or something like that?

default
{
    state_entry()
    {
       llTargetOmega(<1.0,0.0,0.0>*llGetRot(),0.1,0.01);
    }
}

Many many many many thanks!

Untitled-1.png

_________________________________________________________________

Ok i think i found an answer! This is what needed. Works well so far!

Quote

 //Rotates very slowly around a cylinder's local or global Z axis
 // .... Good for making a propeller that rotates regardless of initial orientation.
 
default
{
    state_entry()
    {
       llTargetOmega(llRot2Up(llGetLocalRot()), PI, 1.0);
    }
}

 

 

Edited by MIVIMEX
Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

That example from the LSL wiki will rotate your object around its own (local) Z axis, as the note says.  If you want it to rotate around an axis that is 45 degrees from the regional Z axis, in the X-Z plane, you'd write

llTargetOmega(<1.0,0.0,1.0>,0.1,0.01);

Then, if you wanted to keep that same 45 degree angle as you turn your object relative to the regional axes, you write

llTargetOmega(<1.0,0.0,1.0>*llGetRot(),0.1,0.01);

  • Thanks 1
Link to post
Share on other sites
You are about to reply to a thread that has been inactive for 1161 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...