NEON-29: Aim walk ledge probes at click when nav column descends

Column steering follows path tangents on the violet deck while the
authoritative goal sits on the lower floor; velocity-aligned support rays
kept hitting deck in the tangent direction and suppressed ledge gravity.
Use want_goal_h for probe offsets when vertical routing + column steer
+ on floor + goal surface below feet.
pull/41/head
VinPropane 2026-04-12 18:18:43 -04:00
parent c3fd9892e3
commit db1f4da068
1 changed files with 14 additions and 1 deletions

View File

@ -944,10 +944,23 @@ func _physics_process(delta: float) -> void:
else:
_set_horizontal_velocity_toward(_auth_walk_goal, want_goal_h)
# Prefer actual horizontal velocity so probes match nav/path steering, not only click bearing.
# Prefer [param velocity] XZ so probes match [code]move_and_slide[/code] / path steering (NEON-16).
# Exception: with **column** path steering toward a **lower** click, velocity often hugs the baked
# path tangent on TerracePlatformB (violet) while [param want_goal_h] points at the floor — rays
# along velocity keep hitting deck ahead → false “support” and no ledge gravity until XZ closes
# (violet → gold → floor). Use click bearing for probes in that case only.
var walk_move_dir_xz := Vector2(velocity.x, velocity.z)
if walk_move_dir_xz.length_squared() < 1e-10:
walk_move_dir_xz = Vector2(want_goal_h.x, want_goal_h.z)
elif (
needs_vertical_routing
and _walk_nav_column_steering
and is_on_floor()
and _auth_walk_goal.y < feet_y - DESCEND_GOAL_Y_MARGIN
):
var wh2 := Vector2(want_goal_h.x, want_goal_h.z)
if wh2.length_squared() > 1e-10:
walk_move_dir_xz = wh2
_apply_walk_air_gravity(delta, walk_move_dir_xz)
floor_snap_length = _walk_floor_snap_length(feet_y, want_goal_h, walk_move_dir_xz)