From 275645c6cf64e78d377aab2c180b46b23ad55532 Mon Sep 17 00:00:00 2001 From: VinPropane Date: Sun, 12 Apr 2026 00:07:36 -0400 Subject: [PATCH] =?UTF-8?q?NEON-29:=20Descend=20floor=5Fblock=20+=20weak?= =?UTF-8?q?=20lip=20peel=20(fix=20stuck=20step/platform=E2=86=92floor)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Relax floor_block whenever feet are >7 cm above a lower goal — stall/wall was too late for step1→floor. Re-tighten only in the last centimeters (wallish/stall). Apply DESCEND_WEAK_PEEL_MULT on_floor while descending every frame; ramp to DESCEND_LIP_GRAVITY_MULT when stalled/wallish/carry. Skip peel when airborne (full gravity from _apply_walk_air_gravity). --- client/scripts/player.gd | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/client/scripts/player.gd b/client/scripts/player.gd index e6c6250..49d100a 100644 --- a/client/scripts/player.gd +++ b/client/scripts/player.gd @@ -31,10 +31,11 @@ const DESCEND_GOAL_Y_MARGIN: float = 0.06 ## Cap floor snap while descending from a step so Jolt cannot snap the capsule back onto the ## upper surface across an internal edge (lip hang). Relaxed once feet are near the goal height. const DESCEND_LIP_SNAP_CAP: float = 0.12 -## Extra downward integration vs plain gravity when the descend path is stalled at a lip (ticks>0 -## or wall contact). Full-time on-floor gravity was removed — it made platform→floor crossing -## feel glued until the capsule finally dropped. +## Strong downward multiplier at a stalled lip (stall tick, wallish contact, or carry from prior). const DESCEND_LIP_GRAVITY_MULT: float = 7.0 +## Weaker always-on peel while on_floor and descending so internal edges unstick without waiting +## for stall detection; kept < 1.0 so flat spans on a platform still allow horizontal motion. +const DESCEND_WEAK_PEEL_MULT: float = 0.72 ## Y lift when blocked by wall-ish slide but nav goal is higher (stepped bumps). const WALK_STEP_ASSIST_DELTA: float = 0.11 ## Skip assist when horizontal velocity already aligns enough with want-dir (corners slide slowly). @@ -286,8 +287,12 @@ func _update_floor_block_on_wall_for_terraces(feet_y: float) -> void: var goal_below: bool = _auth_walk_goal.y < feet_y - DESCEND_GOAL_Y_MARGIN if not goal_below: return - var wallish: bool = _walk_has_wallish_slide_contact() - if wallish or _descend_lip_stall_ticks >= 1: + # While clearly above the lower target, always relax — waiting for wallish/stall left step→floor + # and platform→floor stuck with no recovery. Tighten again near landing so floor contact stays sane. + if feet_y > _auth_walk_goal.y + 0.07: + floor_block_on_wall = false + return + if _walk_has_wallish_slide_contact() or _descend_lip_stall_ticks >= 1: floor_block_on_wall = false @@ -296,15 +301,18 @@ func _apply_descend_lip_peel( ) -> void: if _auth_walk_goal.y >= feet_y - DESCEND_GOAL_Y_MARGIN: return + if not is_on_floor(): + return var g := get_gravity() * delta if g.y >= 0.0: return - if ( + var strong: bool = ( _descend_lip_stall_ticks >= 1 or _walk_has_wallish_slide_contact() or carry_lip_from_prior_move - ): - velocity.y += g.y * DESCEND_LIP_GRAVITY_MULT + ) + var w: float = DESCEND_LIP_GRAVITY_MULT if strong else DESCEND_WEAK_PEEL_MULT + velocity.y += g.y * w func _descend_update_lip_stall_after_move() -> void: