Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Rotation Point?

Erin Talamasca
Registered User
Join date: 18 Sep 2005
Posts: 617
06-05-2006 11:14
Is there a specific rotation point for a linked set either as an object or an attachment? I could swear it used to be the parent prim, but now it just seems to make up some point roughly central to the overall mass. And why oh why in a rational universe would that ever be the case? :(
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
06-05-2006 16:58
You have two rotation points, when rotating an object using the mouse (where you drag the coloured rings around a sphere) you are rotating around the centre of the object, sometimes this centre can be in a funny position due to cut prims so it's along the lines of the centre of the box which could encase all the linked prims (or selected prims) when they are not cut/sheared etc.

The second rotation point is the root prim and this applies only to changing the rotation numbers in the edit window's object tab.

So there you have it, make sense? no but thats the tools we have to work with.

As a side note, you'll find that the position value of a linked set is the root in the case of the edit window (manually adjusting the numbers) and of the centre of the bounding box for the mouse controlled editing and the red green and blue numbers at the top centre of the screen.
Erin Talamasca
Registered User
Join date: 18 Sep 2005
Posts: 617
06-06-2006 01:18
I wasn't expecting it to make sense :) Actually, I knew the position-relating-to-parent thing without realising I use that much of the time. Didn't know about the difference between alterations by number and by mouse though *rolls eyes*

I'm guessing it's the centre-of-object case with attachments - basically what's making me pull my hair out is attaching a prim 'head' to an avatar and not being able to have it rotate around a point I specify, e.g. the parent. But that used to be the case once, didn't it? I'm not just going mad?
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
06-06-2006 03:58
If it is completely nessesary for you to rotate about the parent prim of an attachment you could use a script, something like the following, then remove it once you've got the right angle:

CODE

default
{
state_entry()
{
llListen(0,"",llGetOwner(),""); // Open listen, not a good idea if you're intending to keep the script in the object for long
}

listen(integer chan, string name, key id, string msg)
{
if (llGetSubString(msg,0,0) == "<")
{
vector euler = (vector)msg;
vector euler_in_rad = euler * DEG_TO_RAD;
rotation quat = llEuler2Rot(euler_in_rad);
llSetRot(quat);
}
}
}


Just type in your rotation value in Degrees like so: <0,0,45>

This was thrown together quickly and isn't intended for long term use, if you do wish to keep it in, change the 0 in llListen for a larger number i.e. 9 and use /9<0,0,45>