Skip to content

feat(player): add post-aim facing grace before movement override - #290

Merged
f1cklepickle merged 1 commit into
mainfrom
agent/player-post-aim-facing-grace
Aug 9, 2026
Merged

feat(player): add post-aim facing grace before movement override#290
f1cklepickle merged 1 commit into
mainfrom
agent/player-post-aim-facing-grace

Conversation

@f1cklepickle

Copy link
Copy Markdown
Owner

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

  • Added a prefab-tunable 0.6-second post-aim facing grace for desktop and mobile input
  • Made active defense aim the highest-priority facing source with retained/current fallback
  • Separated facing execution from velocity-only movement orchestration
  • Added EditMode, PlayMode, prefab-contract, and regression coverage

How to test

  1. Open the main prototype scene and move away from a target while aiming toward it
  2. Release attack aim, begin block/parry during the grace period, and verify movement continues while facing stays stable
  3. Adjust defense aim while held and verify it overrides walking; release defense and verify walking immediately regains facing
  4. Run tests:
    • EditMode
    • PlayMode

Checklist

  • Unit tests (EditMode) added or updated
  • PlayMode test or manual validation included
  • Demo scene updated (N/A - no scene changes required)
  • Prefab links, tags, and layers validated
  • README / Docs touched (N/A - no documentation changes required)

Related

@f1cklepickle f1cklepickle added feature New feature or request gameplay Anything affecting the core loop (combat, waves, health). testing Work specifically related to adding or fixing test setups labels Aug 8, 2026 — with ChatGPT Codex Connector
@f1cklepickle
f1cklepickle marked this pull request as ready for review August 9, 2026 00:48
@f1cklepickle
f1cklepickle merged commit d815736 into main Aug 9, 2026
4 checks passed
@f1cklepickle
f1cklepickle deleted the agent/player-post-aim-facing-grace branch August 9, 2026 00:49

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +32 to +33
if (attackAimActive && hasResolvedAim)
lastAttackAimDirection = resolvedAimInput.normalized;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request gameplay Anything affecting the core loop (combat, waves, health). testing Work specifically related to adding or fixing test setups

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(player): add post-aim facing grace before movement override

1 participant