Help! (Updated - more info, see below)
I'm having a problem with Sit scripts when aligning attachments and I wonder if anyone can help.
Background
========
I am building a high-prim airplane, the Pilot wearing the extra prims that go above the 31 prim physical limit.
The pilot sits in the seat, which has a sit script.
I am using ZERO_ROTATION for the sitting position.
The pilot is correctly located on the seat prim using
vector avPosition = <X,Y,Z>; (the actual values are not relevant in this problem)
rotation avRotation = ZERO_ROTATION;
and
llSitTarget(avPosition, avRotation);
Now, as I understand it, the pelvis is the 'root prim' for an av, so the center of the pelvis should be located in the seat in the same place IRRESPECTIVE of the size of the Av.
So, after sitting, the center of the pelvis of any Av SHOULD always be in the same postion xyz relative to the center of the prim that has the sit script in it.
Finally, the Av wears the extra prims, on the pelvis, which should be relative to the fixed location of the center of the Av's pealvis.
I successfully adjust the extra worn prims so that they align with the rest of the aircraft correctly, so whenever i wear them they line up OK.
The Problem
===========
If an Av of a different size sits on the seat prim, the worn extra prims are misaligned relative to the seat prim, in the z plane, and possibly x and y to a lesser amount.
The rotation of the attachments may also be affected by a small amount, although it is not clear whether this happens.
The result is that the prim attachments of the aircraft no longer align with the aircraft assembly which contains the seat prim.
Given that the SitTarget offset position, center of the Av's pelvis, and center of the pelvis-worn prim assembly should always be exactly coincidental (as I understand it), why does this misalignment arise for different sized Avs?
Comments and advice would be appreciated.
*** UPDATE ***
With further exprimentation, it seems that the Avatar's "Hip Length" setting is mainly responsible for the offset / misalignment. It seems that changing Hip length means that the pelvis center for SitTarget is not the same as the pelvis center of the Av for atttachments worn on the pelvis.
Is there an explanation, or is this a bug?