Skip to content

Autorotate loses yaw at vertical pitch and changes model scale #118

Description

@Ethanout

Description

Entity OBJMC models have two related autorotate inconsistencies:

  1. At vertical pitch, the facing vector has no horizontal projection. Deriving yaw only from facing.xz therefore produces atan(0, 0), making horizontal rotation snap to zero when looking straight up or down.
  2. The autorotate branch multiplies decoded positions by the carrier quad scale, while autorotate off does not. The same OBJ is rendered at different sizes depending on the autorotate mode.

Reproduction

  1. Generate the same OBJ with autorotate modes off, yaw, pitch, and both.
  2. Render the models as entities or equip them in the head slot using identical item model geometry.
  3. Compare off with an enabled autorotate mode: their sizes differ.
  4. Look straight up or down, then rotate horizontally: yaw-enabled models snap toward yaw zero.

Expected behavior

  • All autorotate modes use the same carrier scale.
  • Yaw remains continuous at vertical pitch by using the carrier quad orientation when the facing projection is degenerate.

Environment

  • Minecraft Java 1.21.11
  • Windows 11
  • Vanilla core shader path (Fabric present, no shader mod involved)

A fix and regression tests are being added to #117.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions