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.pull/42/head
parent
6cc2ac60d4
commit
76ff2cddac
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue