What is the best approach for this?
I have attached a prim to the upper leg and am having it report its rotations so that I can see what is going on. The idea is to have the leg prim use a rot target and then, when it gets within range, whisper to the pelvis prim what its rotation is and the pelvis prim would change its rotation to match the leg prim's.
Does this seem good? Or is there a better way to do it?
Assuming this is a good way to do it - then I have a question about the rotations I am seeing. In the leg prim, on the touch_start event, I did the following:
llOwnerSay((string)(llRot2Euler(llGetLocalRot() * DEG_TO_RAD))
When the AV is standing or sitting, I get <0,0,0>
So then I tried:
llOwnerSay((string)(llRot2Euler(llGetRot() * DEG_TO_RAD))
When the AV stands, the x and y elements are 0 and the z element changes depending on how the AV is rotated around z (like with the left / right control).
So this looks promising. When the AV sits, the x and y values change. However, the first thing that doesn't make sense to me is that the value returned for them is a fraction of a degree, like 0.05623 or 0.02974 or something similar. I would expect them to be a much bigger number like 90 or there abouts.
But the second problem when the AV sits is that the x and y are different based on the z. That is, if I have several of the same chairs around the room, all rotated differently around the z, my x and y will be different for each one I sit in.
In this case, how do I know how to set my target so that it supports the AV sitting down at any rotation around z?
Any help would be greatly appreciated. While I feel like I am getting close, I am definitely suffering from a rotation based headache
