[PR #2727] [MERGED] Keep the body facing forward when a player walks backwards #4571

Closed
opened 2026-11-03 04:18:09 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2727
Author: @kacpherek
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: fix/2710-backwards-body-yaw


📝 Commits (2)

  • 5d68512 Keep the body facing forward when a player walks backwards
  • 3ff797d Merge main into fix/2710-backwards-body-yaw

📊 Changes

2 files changed (+19 additions, -3 deletions)

View changed files

📝 crates/horizon-client/src/game/lan.rs (+10 -2)
📝 crates/horizon-client/src/game/perspective.rs (+9 -1)

📄 Description

What and why

While walking backwards the player's own body (and other players on a LAN host) is turned about 50 degrees away from where they look, so it looks diagonal. In vanilla the body stays straight.

The body target followed the walking direction even when walking backwards. Vanilla turns the target around by 180 degrees when the walking direction is more than 95 degrees away from the look direction, so walking backwards keeps the body facing forward. Remote players already did this; the own player model and LAN guest models did not. They do now.

Fixes #2710.

Vanilla reference

LivingEntity.tick: the 95.0F < diffBetweenDirectionAndFacing && diffBetweenDirectionAndFacing < 265.0F branch that sets yBodyRotT = walkDirection - 180.0F, then tickHeadTurn.

Self-check

cargo check -p horizon-client passes.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/2727 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/2710-backwards-body-yaw` --- ### 📝 Commits (2) - [`5d68512`](https://github.com/horizon-rust/horizon/commit/5d68512994628613d8962c1ce446d11a63a376e9) Keep the body facing forward when a player walks backwards - [`3ff797d`](https://github.com/horizon-rust/horizon/commit/3ff797d73d36cae1fad57fd8b4073cef9c028e74) Merge main into fix/2710-backwards-body-yaw ### 📊 Changes **2 files changed** (+19 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/lan.rs` (+10 -2) 📝 `crates/horizon-client/src/game/perspective.rs` (+9 -1) </details> ### 📄 Description ## What and why While walking backwards the player's own body (and other players on a LAN host) is turned about 50 degrees away from where they look, so it looks diagonal. In vanilla the body stays straight. The body target followed the walking direction even when walking backwards. Vanilla turns the target around by 180 degrees when the walking direction is more than 95 degrees away from the look direction, so walking backwards keeps the body facing forward. Remote players already did this; the own player model and LAN guest models did not. They do now. Fixes #2710. ## Vanilla reference `LivingEntity.tick`: the `95.0F < diffBetweenDirectionAndFacing && diffBetweenDirectionAndFacing < 265.0F` branch that sets `yBodyRotT = walkDirection - 180.0F`, then `tickHeadTurn`. ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:18:09 +07:00
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#4571
No description provided.