fix(physics): #32 L.2c wire edge-slide movement flag

This commit is contained in:
Erik 2026-04-30 07:40:43 +02:00
parent 9fea9b13ad
commit 1ec40f2a4f
6 changed files with 75 additions and 14 deletions

View file

@ -210,6 +210,27 @@ public class PhysicsEngineTests
Assert.Equal(0x0009u, result.CellId);
}
[Fact]
public void ResolveWithTransition_EdgeSlideFlag_AllowsNormalFlatMovement()
{
var engine = MakeFlatEngine(terrainZ: 50f);
var result = engine.ResolveWithTransition(
currentPos: new Vector3(96f, 96f, 50f),
targetPos: new Vector3(98f, 96f, 50f),
cellId: 0x0025u,
sphereRadius: 0.5f,
sphereHeight: 1.2f,
stepUpHeight: 0.4f,
stepDownHeight: 0.4f,
isOnGround: true,
moverFlags: ObjectInfoState.EdgeSlide);
Assert.True(result.IsOnGround);
Assert.InRange(result.Position.X, 97.9f, 98.1f);
Assert.Equal(0x0025u, result.CellId);
}
[Fact]
public void ResolveWithTransition_LandblockBoundary_UpdatesFullOutdoorCellId()
{