I am trying to make an artificial horizon indicator for a ship I'm working on. In english, thats the little blue over green ball that shows the aircraft's position in relation to the horizon by angle of attack.
I am close...but the rotation is going backwards it seems. When sitting on ground, at <0,0,0> I have the ball lined up so the "N" is visible when looking to the north (ship is pointed east as that is <0,0,0> in SL for some peculiar reason.
Here is the command I am using:
llSetLocalRot(ZERO_ROTATION * llGetRootRotation());
Unfortunately there are two problems:
1. When I take off and turn toward the north, the ball rotates in the wrong direction so I am looking at the ball as if I am pointing south instead of north.
2. The ball is not rotating correctly with roll or pitch. Hard to zero in on what angle I"m ending up with.
Basically, the ball should ALWAYS be at 0,0,0 global no matter which direction the craft is pointing. I've seen a few things about rotations etc, but my eyes glaze over at all the math. What am I missing here?
I've tried llSetRot and using global 0,0,0 but no go.
. Thanks!