@linuxgurugamerI don't know if this is the best place to post this, but I found a fix for the dynamic parts of the HUD when you're IVA . Here is a part of code that I've used to fix it. The problem arises at private void drawPitchLadder. Hope it's useful.
//funky method
private Quaternion updateHeadingPitchRollField(Vessel v)
{
Vector3d CoM, north, up;
Quaternion rotationSurface;
CoM = v.CoM;
up = (CoM - v.mainBody.position).normalized;
north = Vector3d.Exclude(up, (v.mainBody.position + v.mainBody.transform.up * (float)v.mainBody.Radius) - CoM).normalized;
rotationSurface = Quaternion.LookRotation(north, up);
return Quaternion.Inverse(Quaternion.Euler(90, 0, 0) * Quaternion.Inverse(v.GetTransform().rotation) * rotationSurface);
}
//Draws the pitch ladder or vertical ascent circle, and roll scale
private void drawPitchLadder(Vessel v, bool full)
{
ball = UnityEngine.Object.FindObjectOfType<NavBall>(); //deprecated
Quaternion attitude = updateHeadingPitchRollField(v);
float pitch = (float)((attitude.eulerAngles.x > 180) ? (360.0 - attitude.eulerAngles.x) : -attitude.eulerAngles.x);
//float yaw = (float)attitude.eulerAngles.y; //not useful here
float roll = (float)((attitude.eulerAngles.z > 180) ? (attitude.eulerAngles.z - 360.0) : attitude.eulerAngles.z);
roll = -roll;
//Display relative pitch in orbital mode
//...