Trying to move and rotate simultaneously a child prim in a linked set. Using llSetLocalRot() and llSetPos(llGetLocalPos()+offset) works fine in a 2 step implementation. However attempting to perform the same with llSetPrimitiveParams is performing odd rotations.
Working Code:
vector offsetx = <0,0.5,0>;
rotation z_10;
default
{
state_entry()
{
z_10=llEuler2Rot(<10*DEG_TO_RAD,0,0>
;}
touch_start(integer n)
{
llSetLocalRot(llGetLocalRot()*z_10);
llSetPos(llGetLocalPos()+offsetx);
}
}
Not Working Code

vector offsetx = <0,0.5,0>;
rotation z_10;
default
{
state_entry()
{
z_10=llEuler2Rot(<10*DEG_TO_RAD,0,0>
;}
touch_start(integer n)
{
llSetPrimitiveParams([PRIM_ROTATION,llGetLocalRot()*z_10,PRIM_POSITION,llGetLocalPos()+offsetx]);
}
}
Could someone point me in the right direction here? The (old) LSL wiki states under llSetLocalRot() that:
"Q: How do I perform this with llSetPrimitiveParams on a child of an attached prim?
A: You need to know the local rotation of the root prim of the the attachment and divide your target rotation by the root's local rotation."
Could I get a practical example please?
Thanks as always!
Dominus