fix(app+core): Phase B.3 — player cull-exempt, jump height, slope Z
Three user-reported movement fixes: 1. Player disappears when facing away: StaticMeshRenderer now accepts an alwaysVisibleEntityId. When a culled landblock contains the player entity, it is still drawn. Prevents the frustum culler from hiding the player character when they walk far from their spawn landblock. 2. Jump too high: JumpImpulse reduced from 10.0 to 3.5 (placeholder; retail scales by Jump skill value from the server). 3. Slope Z alignment: replaced the frame-delta slope bias with a foot-forward sampling approach — sample terrain Z at 1 unit ahead in the walk direction and use max(center, foot) as the ground Z. Handles multi-grade slopes where the terrain rises faster than a single-point sample tracks. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
dc0341e85a
commit
192e066182
4 changed files with 41 additions and 18 deletions
|
|
@ -137,7 +137,7 @@ public class PlayerMovementControllerTests
|
|||
|
||||
Assert.False(controller.IsAirborne, "Should have landed");
|
||||
// +0.15 Z bias keeps feet above terrain surface (prevents z-fighting).
|
||||
Assert.Equal(50.15f, controller.Position.Z, precision: 1);
|
||||
Assert.Equal(50.1f, controller.Position.Z, precision: 1);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
@ -177,6 +177,6 @@ public class PlayerMovementControllerTests
|
|||
controller.Update(0.05f, new MovementInput(Forward: true));
|
||||
|
||||
Assert.False(controller.IsAirborne, "Player should have landed");
|
||||
Assert.Equal(20.15f, controller.Position.Z, precision: 1);
|
||||
Assert.Equal(20.1f, controller.Position.Z, precision: 1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue