feat(player): add post-aim facing grace before movement override - #290
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0bd88647b4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (attackAimActive && hasResolvedAim) | ||
| lastAttackAimDirection = resolvedAimInput.normalized; |
There was a problem hiding this comment.
Clear stale aim when a new attack has no direction
When playing with a physical gamepad in an environment without a mouse, an aimed attack populates lastAttackAimDirection, but a later right-trigger attack with the right stick centered leaves that value unchanged because hasResolvedAim is false. Releasing the later attack then starts the grace period using the previous attack's direction, unexpectedly overriding current movement facing for 0.6 seconds. Reset or session-scope the stored direction when a new attack-aim session begins without valid aim.
Useful? React with 👍 / 👎.
Why
Releasing attack aim while moving could immediately return facing to walking, causing a snap during the transition into block or parry. Facing needs a short retained-aim window and deterministic defense priority without coupling movement velocity to facing.
What changed
How to test
Checklist
Related