Hi.
I am curious how to gain the LocalRot of the attached root prim from within a child of that object.
The idea is to get a rotation work within an attached object e.g. holding a gadget and open its lid.
There is already a good idea that mention how to do the rotatin in this article:
/54/85/170765/1.html#post1676086
The mentioned method to get the LocalRot of the root is to send it via linked message.
I don't like that and would prefer a more independent method.
The new Idea:
You know the local rotation of the child (LRC) via llGetLocalRot within the child.
You know the global rotation of the child (GRC) via llGetRot within the cild.
You know the global rotation of the avatar (GRA) via llGetRootRot within the child.
So to get the local rotation of the root prim (LRR) you just have to compute something like:
LRR = GRC + LRC - GRA
Is this correct? And if, how has this to be done in LSL using quaternations?
(And if, why isn't a wonderfull example available in the wiki?)