[GH-ISSUE #7483] Wither side heads occasionally snap to a different rotation #3260

Open
opened 2026-11-03 04:07:05 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @byMehd on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7483

The Wither's two smaller heads (left and right) generally rotate correctly when looking around in Horizon.

However, their rotation sometimes suddenly snaps to a different angle instead of transitioning smoothly. This makes it look as if their rotation is being reset during the animation.

In vanilla Minecraft Java Edition, the side heads rotate smoothly without these sudden jumps.

This is a minor visual animation issue that appears to happen intermittently.

Tested on:

  • OS: Windows PC
  • Horizon version: Nightly c9d474d
Originally created by @byMehd on GitHub (Nov 2, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/7483 The Wither's two smaller heads (left and right) generally rotate correctly when looking around in Horizon. However, their rotation sometimes suddenly snaps to a different angle instead of transitioning smoothly. This makes it look as if their rotation is being reset during the animation. In vanilla Minecraft Java Edition, the side heads rotate smoothly without these sudden jumps. This is a minor visual animation issue that appears to happen intermittently. Tested on: - OS: Windows PC - Horizon version: Nightly `c9d474d`
Author
Owner

@Joansitoh commented on GitHub (Nov 2, 2026):

🤖 Agent: /claim

Claimed by Joansitoh's AI agent (Claude Code, Sonnet 5.5), not by Joansitoh personally.

Cause: turn_heads in crates/horizon-client/src/mobs/wither.rs (~L206-209) calls control::rotlerp (mobs/control.rs:64-73), which is MoveControl.rotlerp and wraps its result into 0..360. Vanilla WitherBoss.rotlerp (WitherBoss.java:406-417) is a + clamp(Mth.wrapDegrees(b - a), -max, max) with no wrap. Looking up gives a negative pitch, which becomes +360 each tick, and yaw does the same when it crosses 0. The stored angle then jumps by about 360 degrees, and the client's partial-tick lerp in anim() sweeps the head across the whole range for a frame.

Plan: replace the three rotlerp calls with a + wrap(b - a).clamp(-max, max) (clamps 40 / 10 / 10 as in vanilla L204-207) and add unit tests with hand-computed values, for example rot(-5, -100, 40) = -45 and rot(355, 10, 10) = 365, plus a bounded-step check. The head angles are never sent over the network (the client recomputes them from the synced target ids), so only this client/server logic changes.

<!-- gh-comment-id:6583377802 --> @Joansitoh commented on GitHub (Nov 2, 2026): 🤖 Agent: /claim Claimed by Joansitoh's AI agent (Claude Code, Sonnet 5.5), not by Joansitoh personally. Cause: `turn_heads` in `crates/horizon-client/src/mobs/wither.rs` (~L206-209) calls `control::rotlerp` (`mobs/control.rs:64-73`), which is `MoveControl.rotlerp` and wraps its result into 0..360. Vanilla `WitherBoss.rotlerp` (`WitherBoss.java:406-417`) is `a + clamp(Mth.wrapDegrees(b - a), -max, max)` with no wrap. Looking up gives a negative pitch, which becomes +360 each tick, and yaw does the same when it crosses 0. The stored angle then jumps by about 360 degrees, and the client's partial-tick lerp in `anim()` sweeps the head across the whole range for a frame. Plan: replace the three `rotlerp` calls with `a + wrap(b - a).clamp(-max, max)` (clamps 40 / 10 / 10 as in vanilla L204-207) and add unit tests with hand-computed values, for example `rot(-5, -100, 40) = -45` and `rot(355, 10, 10) = 365`, plus a bounded-step check. The head angles are never sent over the network (the client recomputes them from the synced target ids), so only this client/server logic changes.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 2, 2026):

🤖 Claims: refused, You hold 8 open issues: finish or /unclaim one first. (asked by @Joansitoh)

<!-- gh-comment-id:6583401661 --> @github-actions[bot] commented on GitHub (Nov 2, 2026): 🤖 Claims: refused, You hold 8 open issues: finish or `/unclaim` one first. (asked by @Joansitoh)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#3260
No description provided.