Skip to content

feat(player): add directional combat dash - #291

Merged
f1cklepickle merged 1 commit into
mainfrom
feat/player-directional-combat-dash
Aug 10, 2026
Merged

feat(player): add directional combat dash#291
f1cklepickle merged 1 commit into
mainfrom
feat/player-directional-combat-dash

Conversation

@f1cklepickle

@f1cklepickle f1cklepickle commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Why

Player combat needs a reliable active repositioning and dodge option across desktop, gamepad, and Android touch controls without taking ownership from movement, facing, defense, or existing combat-state systems.

What changed

  • Added a focused PlayerDashController that owns normalized snapshotted direction, shared directional speed, full/rear duration, cooldown, mobile threshold, and independently timed i-frames
  • Added full-duration directional dashes and a neutral backward dodge, with broad rear-hemisphere movement using the issue-defined 0.60 duration multiplier at the same speed
  • Added Left Ctrl and L3 bindings, plus movement-stick release dashes through the existing mobile virtual-gamepad/Input System path
  • Reused existing attack reset, defense state, repair, potion, and health/damage contracts to enforce dash restrictions and invulnerability
  • Routed dash velocity through collision-aware player movement while leaving facing execution independent
  • Wired the player prefab/input asset and added focused EditMode and PlayMode regression coverage

How to test

  1. Open MainPrototype and validate directional WASD + Left Ctrl dashes, including neutral straight-back dodge
  2. Validate gamepad L3 directional and neutral straight-back dodge behavior
  3. Validate a qualifying mobile movement-stick release and pull-back-inside-threshold cancellation
  4. Compare forward/lateral and rear timing/distance, confirming equal speed and unchanged facing
  5. Dash into representative Wall, Barrier, and Vault geometry; confirm collision clamping, supported sliding, continued dash state, and clean post-dash movement recovery
  6. Validate attack/defense/action restrictions and independently timed i-frames, including i-frames outlasting rear movement
  7. Run tests:
    • EditMode — 950/950 passed locally
    • PlayMode — 88/88 passed locally
    • GitHub CI — EditMode, PlayMode, and Android Debug Build passed

Hands-on MainPrototype validation was completed successfully and the directional combat dash behavior feels correct.

Checklist

  • Unit tests (EditMode) added or updated
  • PlayMode coverage added or updated
  • MainPrototype/manual validation completed
  • Demo scene updated (N/A - existing MainPrototype consumes the updated player prefab)
  • Prefab/input links, tags, and layers validated through automated contract coverage
  • README / Docs touched (TEST_LOG.md updated)

Related

@f1cklepickle f1cklepickle added apk Opt-in signal to generate an Android APK build for testing (CI artifacts). feature New feature or request gameplay Anything affecting the core loop (combat, waves, health). prefab Adding/updating prefabs. testing Work specifically related to adding or fixing test setups labels Aug 10, 2026 — with ChatGPT Codex Connector
@f1cklepickle
f1cklepickle marked this pull request as ready for review August 10, 2026 23:53
@f1cklepickle
f1cklepickle merged commit 593c182 into main Aug 10, 2026
3 of 5 checks passed

@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

public void OnPointerUp(PointerEventData eventData)
{
if (!IsTouchPointer(eventData))
return;
SimulatePointerUp();

P2 Badge Track the active touch before publishing a dash release

When two fingers interact with the movement zone, every accepted pointer-up calls SimulatePointerUp() because the zone records no active pointer ID. If one finger is holding an outer movement vector and another finger taps and releases in the same zone, the second release publishes the first finger's qualifying vector, causing an unintended dash and clearing the held movement. Capture one pointer on pointer-down and ignore drag/up events from other pointer IDs.

ℹ️ 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 +151 to +152
bool wasDashing = IsDashing;
Vector2 dashVelocity = wasDashing ? dashController.CurrentVelocity : Vector2.zero;

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 Prorate the final dash physics step

When an inspector-tuned dash duration is not an exact multiple of Time.fixedDeltaTime, wasDashing remains true for the entire final physics step and applies full dash velocity before the timer is reduced to zero. For example, a 0.21-second dash at a 0.02-second timestep moves for 0.22 seconds, so actual distance no longer equals the exposed dashSpeed * duration contract; use only the remaining fraction of the last step or otherwise integrate the timer before selecting displacement.

Useful? React with 👍 / 👎.

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

Labels

apk Opt-in signal to generate an Android APK build for testing (CI artifacts). feature New feature or request gameplay Anything affecting the core loop (combat, waves, health). prefab Adding/updating prefabs. 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 directional combat dash

1 participant