
joywayerandClaude Opus 4.8
66d100f353
fix(enemy): 目标点吸附改用固定大搜索距离,与 PB2d 映射任意点机制一致
上版把搜索距离绑到 agent→目标距离(仿 UpdatePath),仍脆弱:吸附距离取决于 agent 离得多远
而非目标离导航段多远——agent 贴在高处路点正下方时距离小、reach 小仍会漏。
查明 PB2d 映射机制(NavGraph.TryMapPointSurface):queryAABB 边长=传入值、可靠搜索半径仅其一半;
PB2d 映射"鼠标点击等任意点"用固定的 closestToSegmentMaxDistance(默认 20,"想多大就多大")。
据此改为:EnemyNavAgent._maxSnapDistance(默认 10m,真实"点离最近段"上限),底层传 2× 补偿 AABB 半宽。
只要目标在 _maxSnapDistance 内一定吸附到最近烘焙段,返回 false 仅表示目标真正脱离导航面。
Play 实测:两路点 + 压力用例(agent 正上方 3m/5m)ResolveStandablePoint 均 ok=True 且映射到地面段。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-23 10:35:24 +08:00
..
2026-05-08 11:04:00 +08:00
2026-05-08 11:04:00 +08:00
2026-05-08 11:04:00 +08:00
2026-07-23 10:35:24 +08:00
2026-05-08 11:04:00 +08:00
2026-05-08 11:04:00 +08:00
2026-05-08 11:04:00 +08:00
2026-05-08 11:04:00 +08:00
2026-05-08 11:04:00 +08:00
2026-05-08 11:04:00 +08:00