Skip to content

feat(input): implement pc mouse aim and hold-fire auto-swing#152

Merged
f1cklepickle merged 7 commits intomainfrom
feat/input-pc-mouse-140
Mar 6, 2026
Merged

feat(input): implement pc mouse aim and hold-fire auto-swing#152
f1cklepickle merged 7 commits intomainfrom
feat/input-pc-mouse-140

Conversation

@f1cklepickle
Copy link
Copy Markdown
Owner

Why

PC combat needed mouse-facing + left-click attack support, and hold-fire behavior needed to be reliable without breaking mobile touch controls.
Recent changes also required structure cleanup to prevent PlayerController from regressing.

What changed

  • Added PC look binding for mouse position and wired cursor-facing attack flow
  • Implemented hold-left auto-swing behavior through existing cooldown-gated attack authority
  • Fixed mouse pointer bleed into mobile touch zones during normal editor PC testing
  • Extracted fire and aim responsibilities into dedicated components:
    • PlayerFireInputController
    • PlayerAimInputResolver
  • Wired extracted components explicitly on Player.prefab
  • Added EditMode + PlayMode regression coverage and updated Docs/TEST_LOG.md

How to test

  1. Open MainPrototype
  2. Press Play and verify:
    • PC: mouse look + left-click attack works
    • Hold left-click: repeated attacks
    • Release left-click: attacks stop immediately
  3. Verify editor touch controls do not hijack mouse movement in normal PC play
  4. Verify Android simulator/touch behavior still supports right-stick/aim-zone direction
  5. Run tests:
    • EditMode
    • PlayMode (includes hold-fire cadence regression)

Checklist

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

Related

@f1cklepickle f1cklepickle added feature New feature or request tech-debt Cleanup, refactor, or restructuring of code/assets testing Work specifically related to adding or fixing test setups docs Updates to documentation or guides. gameplay Anything affecting the core loop (combat, waves, health). labels Mar 6, 2026
@f1cklepickle f1cklepickle merged commit b5d5b94 into main Mar 6, 2026
4 checks passed
@f1cklepickle f1cklepickle deleted the feat/input-pc-mouse-140 branch March 6, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Updates to documentation or guides. feature New feature or request gameplay Anything affecting the core loop (combat, waves, health). tech-debt Cleanup, refactor, or restructuring of code/assets testing Work specifically related to adding or fixing test setups

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(input): pc mouse aim — cursor facing and left-click attack

1 participant