I'm not sure what use this might be but I'll throw it out here.
I use something like this to set positions of linked prims in ships. Only I have not tried the rotation part of it yet.
I would assume it to be very similar though.
I am just using myXrotation, myYrotation, myZrotation for the vector.
eh I'll just throw the code and see what comes of it.
if(message=="set rotation")
{
llSetPrimitiveParams([
PRIM_POSITION,<0.00000, 0.00000, 0.00000>,PRIM_ROTATION,<myXrotation, myYrotation, myZrotation, 1.00000> / ( (ZERO_ROTATION / llGetLocalRot()) * llGetRot())]);
}
This code above just rotates one prim within the linked set to whatever the, "myXrotation" etc, variable is set to. (It's placed inside a linked prim other than the root)
This code below I got from someone once to show me how to face North, South, East or West on demand.
I pulled this part out of the "Face North" section of one of my ships. But really it just makes it face 45 degrees. I think that all depends on the roots current postion? I'm not sure. I think 45 is what faced north for me so I used it. I can't remember.
In any case I would guess somehow linking the code above, with the code below, would be how it works. Somehow. lol
Oh the comments in the code are not mine by the way.
vector eul = <0, 0, 90>; //45 degrees around the z-axis, in Euler form.
eul *= DEG_TO_RAD; //convert to radians.
rotation quat = llEuler2Rot(eul); //convert to quaternion.
llSetRot(quat); //rotate the object
Maybe someone else could put this together somehow? I hate it when I can just about see something fit together but can't get the darn thing to snap right. lol
:addition:I'm assuming this part:
llSetRot(quat);
Is where we would work in the:
llSetPrimitiveParams([
hmm I wonder if something like this would work using the quat from the llSetRot(quat)?:
vector eul = <0, 0, 90>; //45 degrees around the z-axis, in Euler form.
eul *= DEG_TO_RAD; //convert to radians.
rotation quat = llEuler2Rot(eul); //convert to quaternion.
llSetPrimitiveParams([
PRIM_POSITION,<0.00000, 0.00000, 0.00000>,PRIM_ROTATION,<quat> / ( (ZERO_ROTATION / llGetLocalRot()) * llGetRot())]);
Or some evil magic like that maybe?

I dunno.
Obviously none of that will compile because it needs fitting into the main script.
But if it blows up don't look at me.
