Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Controlling Rotation

Slawkenbergius Slade
Registered User
Join date: 21 May 2007
Posts: 133
09-13-2007 10:22
Hi

I'm having increasing problems with the rotation tool. Because of the need to taper, the objects are already rotated on one axis before positioning into the build - needless to say the build is not at convenient orientation to the world in the first place. I'm finding it almost impossible to line them up by eye and, due to rotation on multiple axes, can't calculate the numbers to input them direct.

Anyone have any tips on how to control rotation efficiently - or a pointer to a good source of info on the subject?
DanielFox Abernathy
Registered User
Join date: 20 Oct 2006
Posts: 212
09-13-2007 22:13
One method I've used when rotations get confusing is to make a unit cube and place it at the axis of rotation I'd like. Then link whatever you're working on to this unit cube such that the cube is the root prim. Now if the center of rotation of this cube is the same as your object, great, you can rotate it directly in the editor, starting from 0,0,0 angles from all sides since the unit cube is your "rotation control" now. When you're done you can unlink it and delete the cube.

However, often you want to rotate an object around an arbitrary point, or rotate multiple objects together around an arbitrary point, and this is where a little scripting comes in because it doesn't seem like you can rotate around a root prim in the editor. (The rotation instead takes place around the center of the linkset bounding box)
Link your object(s) to the unit cube, and then stick this script in the cube, which should again be the root prim:

default
{
state_entry()
{
llSetRot(llEuler2Rot(<45.0,0.0,0.0>*DEG_TO_RAD));
}
}

You don't have to know scripting to use this; just substitute your desired rotational values between the brackets. <X,Y,Z>. This well set *absolute* rotation, like you entered the values into the editor. If you want relative rotation,

default
{
state_entry()
{
llSetRot(llEuler2Rot(<45.0,0.0,0.0>*DEG_TO_RAD) * llGetRot());
}
}

Of course if you just have one object and want to do a relative rotation on it, you can just drop this script in that object by itself. Hope some of this makes sense :D
Now every time you reset the script, it will rotate 45 degrees on the X axis. To keep from getting a headache, try to rotate on one axis at a time.
Al Sonic
Builder Furiend
Join date: 13 Jun 2006
Posts: 162
Local rotation, & stuff
09-14-2007 11:57
Ah, I just remembered to ask... have you tried setting Ruler Mode to "Local"? This will change the position of the red/green/blue rings to rotate relative to the current selected object or prim's rotation.

Also, if you want to rotate relative to the current camera angle, you certainly can. Hold Ctrl and click on the sphere that appears inside the red/green/blue rings, and it will allow you to spin it left, right, up, and down. To spin it the other two ways – clockwise and counterclockwise – click just outside that sphere and drag it around.
_____________________
If I said a thing ya don't understand, lemme know. I too love it when info is easy to read :D.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
09-14-2007 12:08
The reference grid is your friend. Select a prim that well represents the basic orientation of the house, and then press shift-G (with the chat bar closed, of course). The manipulator and the grid will orient themselves to match the rotation and size of the selected prim (the "reference prim";). Now you can easily align other prims to match the rotation of the first one. Also, the grid units will change to match the size of the reference prim, so you can easily snap other objects to it.

The grid will remain fixed on your reference prim until you reference a different prim, or until you exit reference mode altogether to go into local mode or world mode.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
Slawkenbergius Slade
Registered User
Join date: 21 May 2007
Posts: 133
09-14-2007 13:14
Aw thanks guys (if that's what you all are)

I'd figured a partial solution in that I had stopped trying to place copied items from their original orientation, which was definitely doing it the hard way.

These look like brilliant options & I'm going off to play with them right now.