[GH-ISSUE #5121] The skin darkens when sleeping, after sleeping player stands inside the bed block #1558

Closed
opened 2026-11-02 15:47:59 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @kira-horizon[bot] on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5121

Version: nightly-2026-10-31-9d979ca · OS: macOS 26, Apple M2, M2 GPU (copied from the report)

What I did:
Slept in a bed.
Watched the screen and the player skin during sleep.
Woke up and checked where the player stood and what state was active.

What happened:
When sleeping in a bed, not only the camera/screen darkens but the player skin darkens too. On waking, the player stands right inside the bed block instead of on a free block, which triggers swimming mode.

What I expected:
Only the camera/screen should darken during sleep. On waking, the player should stand on a free block next to the bed, without entering swimming mode.

Does it happen every time?
Yes.

Horizon version: nightly-2026-10-31-9d979ca

OS, CPU, GPU: macOS 26, Apple M2, M2 GPU

Reported on Discord by szanbros in #horizon-bugs · Discord thread
Tags: rendering

Attachments (Discord links expire after a while; the thread keeps them)

Opened by Kira from Discord. Replies from the reporter in the thread are added here as comments.

Originally created by @kira-horizon[bot] on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/5121 **Version:** nightly-2026-10-31-9d979ca · **OS:** macOS 26, Apple M2, M2 GPU <sub>(copied from the report)</sub> > What I did: > Slept in a bed. > Watched the screen and the player skin during sleep. > Woke up and checked where the player stood and what state was active. > > What happened: > When sleeping in a bed, not only the camera/screen darkens but the player skin darkens too. On waking, the player stands right inside the bed block instead of on a free block, which triggers swimming mode. > > What I expected: > Only the camera/screen should darken during sleep. On waking, the player should stand on a free block next to the bed, without entering swimming mode. > > Does it happen every time? > Yes. > > Horizon version: nightly-2026-10-31-9d979ca > > OS, CPU, GPU: macOS 26, Apple M2, M2 GPU Reported on Discord by **szanbros** in #horizon-bugs · [Discord thread](https://discord.com/channels/1559227979002028052/1566069440611618927) Tags: rendering **Attachments** (Discord links expire after a while; the thread keeps them) - [compressO-_2026-10-31_15.34.33.mp4](https://cdn.discordapp.com/attachments/1566069440611618927/1566069441379311766/compressO-_2026-10-31_15.34.33.mp4?ex=6ae73352&is=6ae5e1d2&hm=486f25b4f8e75ae59eb217aee2664ae9171b14161d72e4a36ee2f9d93978b23b&) - [compressO-_2026-10-31_15.30.21.mp4](https://cdn.discordapp.com/attachments/1566069440611618927/1566069442138472458/compressO-_2026-10-31_15.30.21.mp4?ex=6ae73353&is=6ae5e1d3&hm=b8923f540797784709aa90e41f3ab0a948d18aa3eff861a3110bfe701f8e4d33&) - [2026-10-31_15.29.25.png](https://cdn.discordapp.com/attachments/1566069440611618927/1566069443161886770/2026-10-31_15.29.25.png?ex=6ae73353&is=6ae5e1d3&hm=de83194e862f01f0e97e7ed522796d28ac9f52cc3ac494a1ce239f2cd30ff4b2&) <sub>Opened by Kira from Discord. Replies from the reporter in the thread are added here as comments.</sub><!-- kira -->
bsakaguchi 2026-11-02 15:47:59 +07:00
Author
Owner

@mulareal commented on GitHub (Oct 31, 2026):

🤖 Agent:

/claim

<!-- gh-comment-id:6543573799 --> @mulareal commented on GitHub (Oct 31, 2026): 🤖 Agent: /claim
Author
Owner

@mulareal commented on GitHub (Oct 31, 2026):

🤖 Agent: Cause and fix, verified in the real game.

Cause: Three pieces of vanilla's bed handling were missing:

  1. While lying in a bed (y = bed_y + 0.6875), the player model still sampled block and sky light at the standing eye height (+ 1.62) instead of the sleeping eye height (+ 0.2). In a two-block-high room, that light probe landed inside the solid ceiling block above the bed (where light is 0), turning the player skin dark while sleeping.
  2. While sleeping, the player's vertical look angle (pitch) was not reset to 0°, so clicking a bed from close up while looking steeply down left the sleeping player's head tilted upward into the first-person camera.
  3. Waking up cleared the sleeping state without moving the player to a stand-up spot beside the bed (BedBlock.findStandUpPosition), leaving the player standing on top of the bed (and forcing them into crawling/swimming mode when a ceiling was two blocks above the floor).

Fix: #5211 by @mulareal samples player model light at the current pose's eye height, keeps the sleeping pitch at 0° on the pillow, and places the player standing beside the bed facing its headboard on waking.

<!-- gh-comment-id:6545442977 --> @mulareal commented on GitHub (Oct 31, 2026): 🤖 Agent: Cause and fix, verified in the real game. **Cause:** Three pieces of vanilla's bed handling were missing: 1. While lying in a bed (`y = bed_y + 0.6875`), the player model still sampled block and sky light at the standing eye height (`+ 1.62`) instead of the sleeping eye height (`+ 0.2`). In a two-block-high room, that light probe landed inside the solid ceiling block above the bed (where light is `0`), turning the player skin dark while sleeping. 2. While sleeping, the player's vertical look angle (`pitch`) was not reset to `0°`, so clicking a bed from close up while looking steeply down left the sleeping player's head tilted upward into the first-person camera. 3. Waking up cleared the sleeping state without moving the player to a stand-up spot beside the bed (`BedBlock.findStandUpPosition`), leaving the player standing on top of the bed (and forcing them into crawling/swimming mode when a ceiling was two blocks above the floor). **Fix:** #5211 by @mulareal samples player model light at the current pose's eye height, keeps the sleeping pitch at `0°` on the pillow, and places the player standing beside the bed facing its headboard on waking.
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#1558
No description provided.