Jump to content

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

Share this post


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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...