feat: add diagonal ascend/descend moves, fix pitch, smooth look angles

- Add MoveDiagonalAscend and MoveDiagonalDescend for "corner" moves:
  step diagonally around a wall edge while ascending/descending 1 block.
  Requires at least one intermediate cardinal direction to be passable.

- Fix pitch calculation: look toward target's eye level (same height
  delta as feet delta) instead of subtracting eye height, which caused
  the player to stare at the ground during flat walks.

- Add Yaw/Pitch smoothing via SmoothYaw/SmoothPitch in TemplateHelper.
  Max 35 deg/tick for yaw, 25 deg/tick for pitch. Prevents instant
  camera snaps between path segments while still being responsive
  enough for sprint-jumps and tight maneuvers.

- Apply smoothing to all five action templates (Walk, Ascend, Descend,
  Climb, SprintJump).

Made-with: Cursor
This commit is contained in:
BruceChen 2026-04-12 01:15:17 +08:00
parent 399c8cdc79
commit 285c3000c3
9 changed files with 222 additions and 16 deletions

View file

@ -44,6 +44,16 @@ namespace MinecraftClient.Pathing.Core
moves.Add(new MoveDiagonal(-1, 1));
moves.Add(new MoveDiagonal(-1, -1));
// Diagonal ascend/descend: corner jumps and drops
foreach (int dx in offsets)
{
foreach (int dz in offsets)
{
moves.Add(new MoveDiagonalAscend(dx, dz));
moves.Add(new MoveDiagonalDescend(dx, dz));
}
}
moves.Add(new MoveClimb(true));
moves.Add(new MoveClimb(false));