Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Zenith indicator pointing somewhere wrong #4587
The zenith indicator does not always point away from the current reference body. The deviation varies from nearly none to rather extreme, with a sample leaning towards the latter seen in the following screenshot:
(observe how the indicator is some mere (estimated) 30° away from the nadir).
The zenith indicator should always point away from the current reference body.
Steps to reproduce
As noted in #4583 (comment),
Remark that this does not lead to as extreme an instance of this bug as the screenshot above. (Perhaps, entering and leaving the frame of an in-orbit starport might “help”.)
My Pioneer version
Observed on the current commit of #4583, i.e. be341d4, (where the screenshot was taken) and on current
Fairly straightforward error. displayFrameIndicators in game.lua calls the function:
A->GetPositionRelTo(B) returns the relative position in B's frame. In this case, B is the planet, and planets are placed in the rotating frame. As the camera is outside the rotating frame, that's not what you want. Semi-correct version is:
I'm not sure what the reason was for the 1.01, but it's probably not a good one.
I say "semi-correct" because UI code should be using interpolated rather than physics positions and orientations to avoid jitter, but I'm not sure whether that functionality has been exposed to lua.
Edit: Forgot minus sign.
I'm just guessing @jaj22 refers to these functions:
And to the fact that these functions should be used during render calls