Skip to content

Conversation

@Clayell
Copy link

@Clayell Clayell commented Jul 8, 2025

Without this, the labels will appear in front of the camera again, which looks very strange. Found this bug when working on the LTP remake.

Tested to be working in-game
image
image

@Clayell
Copy link
Author

Clayell commented Jul 22, 2025

Additional code to make the label disappear when far away:

        bool cameraNear = PlanetariumCamera.fetch.Distance < 100000d * (BodyOrigin.Radius / 6371000d); // 6371000 is earth radius

        if (periapsis.z > 0 && cameraNear)
        {
            GUI.Label(
                new Rect(
                    periapsis.x - 50,
                    Screen.height - periapsis.y - 15,
                    100, 30),
                $"Burn position", _styleLabelEnd);
        }

        if (asymptote.z > 0 && cameraNear)
        {
            GUI.Label(
                new Rect(
                    asymptote.x - 50,
                    Screen.height - asymptote.y - 15,
                    100, 30),
                "Escape direction", _styleLabelTarget);
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant