From 591db65b4adc1914240a2bef55e9d9aa81402d96 Mon Sep 17 00:00:00 2001 From: VinPropane Date: Sun, 12 Apr 2026 17:27:37 -0400 Subject: [PATCH] NEON-29: Fix idle_support_is_stable test normal vs 0.999 dot (0.02, 0.995).normalized() dots ~0.9998 with UP, so default STABLE_IDLE_FLOOR_MIN_UP_DOT (0.999) still treats it as flat. Use the same tilted normal as min_flat_up_dot_parameter test. --- client/test/player_test.gd | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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()