diff --git a/client/test/player_test.gd b/client/test/player_test.gd index 8a4fc76..3d85653 100644 --- a/client/test/player_test.gd +++ b/client/test/player_test.gd @@ -70,9 +70,10 @@ func test_idle_support_is_stable_on_flat_floor_without_wall_contacts() -> void: func test_idle_support_is_stable_false_when_floor_is_not_flat_enough() -> void: var slide_normals: Array[Vector3] = [Vector3.UP] - var stable: bool = PLAYER_SCRIPT.idle_support_is_stable( - true, Vector3(0.02, 0.995, 0.0).normalized(), slide_normals, 0 - ) + # Must have floor_normal.dot(UP) < STABLE_IDLE_FLOOR_MIN_UP_DOT (0.999). + # (0.02, 0.995).normalized() dots ~0.9998 and incorrectly passes as "flat" at 0.999. + var tilted_floor: Vector3 = Vector3(0.05, 0.99875, 0.0).normalized() + var stable: bool = PLAYER_SCRIPT.idle_support_is_stable(true, tilted_floor, slide_normals, 0) assert_that(stable).is_false()