From 2735695a6be0582cce5505ea79efa348eb0a4278 Mon Sep 17 00:00:00 2001 From: Erik Date: Wed, 10 Jun 2026 14:28:29 +0200 Subject: [PATCH] fix(phys): #111 - snap the player ENTITY at login entry, parity with the teleport-arrival path The entry snap set only the controller (physics stood on the grounded floor) while the renderer kept drawing the entity at the server-restored height - the user's "spawned 2 meters in the air" screenshot over a fully-correct interior. The teleport-arrival path already does entity.SetPosition + ParentCellId (GameWindow.cs:4914); the login path now matches. Co-Authored-By: Claude Fable 5 --- src/AcDream.App/Rendering/GameWindow.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/AcDream.App/Rendering/GameWindow.cs b/src/AcDream.App/Rendering/GameWindow.cs index 985119f6..324c7fe6 100644 --- a/src/AcDream.App/Rendering/GameWindow.cs +++ b/src/AcDream.App/Rendering/GameWindow.cs @@ -11496,6 +11496,14 @@ public sealed class GameWindow : IDisposable playerEntity.Position, pinitCellId, System.Numerics.Vector3.Zero, 100f); _playerController.SetPosition(initResult.Position, initResult.CellId); + // #111 (2026-06-10): snap the ENTITY too — parity with the + // teleport-arrival path (entity.SetPosition + ParentCellId at + // GameWindow.cs:4914). Without this, the renderer keeps drawing the + // character at the server-restored position (ACE restored z=99.475; + // physics grounded to the 94.0 floor; the user saw the char floating + // 2 m up against the window while physics stood on the floor). + playerEntity.SetPosition(initResult.Position); + playerEntity.ParentCellId = initResult.CellId; if (_animatedEntities.TryGetValue(playerEntity.Id, out var playerAE) && playerAE.Sequencer is { } playerSeq)