Jump to content
  • 0

Need to script to rotate a rezzed object 90 degrees


RikBair23
 Share

You are about to reply to a thread that has been inactive for 4220 days.

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

Question

Here is the script I have so far:

default
{

    touch_start(integer total_number) {

        // This line will pick the first object out of the container and rez it
        llRezObject(llGetInventoryName(INVENTORY_OBJECT,0), llGetPos()+<1,0.5,0>,ZERO_VECTOR,llEuler2Rot(<PI,0.0,0.0>),0)

    }

}

The object rezzes face up, I need to rotate it 90 degrees so it can be viewed. What am I missing?

Thanks!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

I'm not a scripter, I build.

You have 3 axis for an objects location, and 3 for it's rotation.

You have 2 sets of 3 numbers,

Getpos 1, 0.5, 0

Euler2rot with all 0's

 

Change the configuration of one number sets, and see what happens. Try Getpos 0,1,0.5

or, eulerrot 90.0 ,0.0,0.0

Do this on a copy, a test example you can delete, or risk losing.

 

I can look for a link on SL scripting.

Link to comment
Share on other sites

  • 0

This is a continuation of an earlier thread at http://community.secondlife.com/t5/Creation/How-do-I-script-an-object-to-rez-another-object-and-have-the/qaq-p/1690039, where you can go for most of the answer.

Your question last time was about how to turn the object upside down.  That's why we applied the rotation

llEuler2Rot(<PI,0.0,0.0>)  .

If you only want to turn the object halfway from zero radians to PI radians, then turn it PI/2 radians ......

llEuler2Rot(<PI/2,0.0,0.0>) .

This one's prettty easy, because it deals with basic math. However, rotations in general are admittedly one of the harder topics in LSL scripting. To learn more about rotations, start with https://wiki.secondlife.com/wiki/Rotation and https://wiki.secondlife.com/wiki/User:Void_Singer/Rotations

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4220 days.

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...