Skip to content

Sky moons drift with the player on Jupiter and other planets stacked GL transforms in SkyProviders #804

Description

@Holwort

---Issue Report---

(PLEASE DONT DELETE THIS TEMPLATE, YOUR ISSUE WILL BE IGNORED AND CLOSED IF YOU DO. | Required)

Have you checked Closed Issues (if applicable & PLEASE CHECK BEFORE POSTING | Required): [Yes]

Description of Issue(Required)

On Jupiter some sky objects stay fixed on the sky while others move and bob with the player when walking on the surface. It feels like those moons are attached to the camera instead of the sky dome. Not every moon does it, only some.
Looking at the source, in SkyProviderJupiter multiple celestial bodies are drawn inside one matrix with repeated glScalef(0.6) and the same glRotatef calls with no glPushMatrix/glPopMatrix per body. Transforms stack, so the first body still looks mostly sky-locked and the later ones track view bobbing when you walk.
Same stacked pattern is also in SkyProviderSaturn, SkyProviderPluto, SkyProviderUranus, SkyProviderNeptune, SkyProviderCeres, SkyProviderEris and SkyProviderMercury. Moon surface sky providers (Io, Europa, Phobos, etc.) only draw one parent body and look fine.

Steps to Reproduce Issue(Required)

Go to Jupiter surface (land with a rocket/shuttle).
Look at the sky moons/planets.
Walk around on the surface and watch some of them move/bob with the player while others stay fixed on the sky.

Crash log/Log (if applicable): [PASTEBIN. Do NOT copy and paste the log into the issue post itself. See below on how to get them]

How do i locate a crash log see https://docs.mjrlegends.com/General%20Minecraft/crash-log/

Screenshots (if applicable):

Mod List (Required):
Galacticraft 4.0.7, ExtraPlanets 0.8.0, MJRLegendsLib 1.2.1 (ExtraPlanets library)

Version of Mod using (PLEASE DONT USE 'Latest' OR 'Newest' | Required): [VERSION]
Galacticraft 4.0.7, ExtraPlanets 0.8.0, MJRLegendsLib 1.2.1 (ExtraPlanets library)

Where did this bug happen(Required): [Single Player or Server]
Single Player

Additional Information

Expected fix is small: wrap each sky body draw in its own glPushMatrix/glPopMatrix (or use absolute angles from the celestial base) so all moons stay fixed on the sky when walking. Happy to test a fix build on Jupiter first.

Activity

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

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions