Skip to content

Commit

Permalink
Fix per-frame eye position
Browse files Browse the repository at this point in the history
Co-Authored-By: IMS <[email protected]>
  • Loading branch information
Asek3 and IMS212 committed Nov 21, 2023
1 parent b099e6a commit b424ffc
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ private static boolean isSpectator() {

private static Vector3d getEyePosition() {
Objects.requireNonNull(Minecraft.getInstance().getCameraEntity());
return new Vector3d(Minecraft.getInstance().getCameraEntity().getX(), Minecraft.getInstance().getCameraEntity().getEyeY(), Minecraft.getInstance().getCameraEntity().getZ());
Vec3 pos = Minecraft.getInstance().getCameraEntity().getEyePosition(CapturedRenderingState.INSTANCE.getTickDelta());
return new Vector3d(pos.x, pos.y, pos.z);
}

public static class WorldInfoUniforms {
Expand Down

0 comments on commit b424ffc

Please sign in to comment.