diff --git a/src/AcDream.App/Rendering/GameWindow.cs b/src/AcDream.App/Rendering/GameWindow.cs index 10196b6..beb110f 100644 --- a/src/AcDream.App/Rendering/GameWindow.cs +++ b/src/AcDream.App/Rendering/GameWindow.cs @@ -381,16 +381,14 @@ public sealed class GameWindow : IDisposable if (meshRefs.Count == 0) continue; - // Compose: the stab's position is cell-local, and the cell's Position - // is landblock-local. Rotate the stab-local position by the cell's - // orientation before adding the cell origin. - var stabLocalPos = stab.Frame.Origin; - var cellOrigin = envCell.Position.Origin; - var cellRot = envCell.Position.Orientation; - var rotatedStab = System.Numerics.Vector3.Transform(stabLocalPos, cellRot); - var landblockLocalPos = cellOrigin + rotatedStab; - var worldPos = landblockLocalPos + lbOffset; - var worldRot = cellRot * stab.Frame.Orientation; + // Stabs inside EnvCells are already in landblock-local coordinates + // (same coordinate space as LandBlockInfo.Objects stabs) — NOT + // cell-local. The EnvCell.Position field tells the physics engine + // which cell owns the object, but it doesn't translate coordinates. + // Adding cellOrigin was a wrong assumption that left interior objects + // floating ~150 units in the air. + var worldPos = stab.Frame.Origin + lbOffset; + var worldRot = stab.Frame.Orientation; var hydrated = new AcDream.Core.World.WorldEntity {