frodare / FlightHud

Minecraft mod that displays a flight styled HUD while flying with elytra.
GNU General Public License v3.0
36 stars 33 forks source link

Support arbitrary camera roll #19

Open allemangD opened 1 year ago

allemangD commented 1 year ago

Based on #18. Thanks for fixing support for 1.19.4 @end-user!


Switch to use whatever camera orientation is used in GameRenderer#renderWorld. Fetches the InverseViewRotationMatrix used just before world rendering occurs and computes roll from that.

This enables roll support for mods Cool Elytra Roll and Do a Barrel Roll, and implicitly supports any other mod which changes camera orientation.

Also moves the FlightComputer instance to be public static final FlightHud#computer, since both InGameHudMixin and GameRendererMixin need access and it seems a good place to put the singleton.


Short demo clip, showing a full flip with Do a Barrel Roll, here: https://youtu.be/V4x2M-dlUL0

Merith-TK commented 1 year ago

Bumping as I would love this

HuJK commented 1 year ago

love this, when can we merge this PR?

hutonahill commented 1 year ago

why hasn't this been merged yet? it seems like an epic feature!