diff --git a/client/scenes/main.tscn b/client/scenes/main.tscn index 2d8b4f5..503a07a 100644 --- a/client/scenes/main.tscn +++ b/client/scenes/main.tscn @@ -49,7 +49,7 @@ size = Vector3(1, 0.15, 1) size = Vector3(0.85, 0.12, 0.85) [sub_resource type="ConvexPolygonShape3D" id="Convex_ns19a_frustum"] -points = PackedVector3Array(-0.65, -0.075, -0.65, 0.65, -0.075, -0.65, 0.65, -0.075, 0.65, -0.65, -0.075, 0.65, -0.5, 0.075, -0.5, 0.5, 0.075, -0.5, 0.5, 0.075, 0.5, -0.5, 0.075, 0.5) +points = PackedVector3Array(-0.72, -0.075, -0.72, 0.72, -0.075, -0.72, 0.72, -0.075, 0.72, -0.72, -0.075, 0.72, -0.5, 0.075, -0.5, 0.5, 0.075, -0.5, 0.5, 0.075, 0.5, -0.5, 0.075, 0.5) [sub_resource type="ConvexPolygonShape3D" id="Convex_ns19b_frustum"] points = PackedVector3Array(-0.575, -0.06, -0.575, 0.575, -0.06, -0.575, 0.575, -0.06, 0.575, -0.575, -0.06, 0.575, -0.425, 0.06, -0.425, 0.425, 0.06, -0.425, 0.425, 0.06, 0.425, -0.425, 0.06, 0.425) diff --git a/client/scripts/player.gd b/client/scripts/player.gd index cc09f8a..900c60f 100644 --- a/client/scripts/player.gd +++ b/client/scripts/player.gd @@ -12,8 +12,17 @@ const MAX_CLIMB_SPEED: float = 2.6 const MAX_DESCENT_SPEED: float = 2.2 const DIRECT_APPROACH_RADIUS: float = 0.85 const NS19_RAY_DOWN: float = 3.0 -## Downward ray origins (Y offset from body origin) so we still detect bump under a tall capsule. -const NS19_UNDERFOOT_RAY_Y: Array[float] = [0.0, -0.45, -0.82] +## Origins (world-space offset from body) before casting down. Wider xz helps the 1 m Bump A rim +## where a single vertical line can clear the frustum; Bump B stays covered too. +const NS19_UNDERFOOT_OFFSETS: Array[Vector3] = [ + Vector3(0, 0, 0), + Vector3(0, -0.45, 0), + Vector3(0, -0.82, 0), + Vector3(0.42, -0.28, 0), + Vector3(-0.42, -0.28, 0), + Vector3(0, -0.28, 0.42), + Vector3(0, -0.28, -0.42), +] var _has_walk_goal: bool = false var _auth_walk_goal: Vector3 = Vector3.ZERO @@ -45,8 +54,8 @@ func snap_to_server(world_pos: Vector3) -> void: func _should_skip_nav_for_ns19_bump() -> bool: - for y_off: float in NS19_UNDERFOOT_RAY_Y: - if _ns19_bump_under_ray(global_position + Vector3(0.0, y_off, 0.0)): + for off: Vector3 in NS19_UNDERFOOT_OFFSETS: + if _ns19_bump_under_ray(global_position + off): return true return false