From 76ff2cddac334a0bf6bd77ecf1cc0cbe04fc2068 Mon Sep 17 00:00:00 2001 From: VinPropane Date: Fri, 17 Apr 2026 19:37:58 -0400 Subject: [PATCH] NEO-22: clear idle anchor during WASD so stop does not snap back Stable idle latches _idle_anchor_active and _hold_idle_anchor clamps XZ each tick. Locomotion bypasses that branch, so the anchor stayed at the pre-walk position while the capsule moved; releasing keys ran idle again and _hold_idle_anchor teleported to the stale anchor. --- client/scripts/player.gd | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/scripts/player.gd b/client/scripts/player.gd index e120ea0..74c67be 100644 --- a/client/scripts/player.gd +++ b/client/scripts/player.gd @@ -391,6 +391,10 @@ func snap_to_server(world_pos: Vector3) -> void: func _physics_process_locomotion_wasd(delta: float) -> void: if _has_walk_goal: clear_nav_goal() + # Stable idle leaves `_idle_anchor_active` true; `_hold_idle_anchor` is skipped while this + # branch runs, so the anchor XZ would stay at the pre-walk spot and pull the capsule back on + # stop. Clear it every WASD tick so idle can latch a fresh anchor where we actually stopped. + _idle_anchor_active = false floor_block_on_wall = true var feet_y: float = capsule_feet_y( global_position.y, CAPSULE_HALF_HEIGHT + PLAYER_CAPSULE_RADIUS