Skip to content

Feature: Face-controlled game input#1

Open
arashzjahangiri wants to merge 1 commit into
masterfrom
feature/game-controller
Open

Feature: Face-controlled game input#1
arashzjahangiri wants to merge 1 commit into
masterfrom
feature/game-controller

Conversation

@arashzjahangiri

Copy link
Copy Markdown
Owner

Summary

  • Adds GameInputController mapping ARKit blend shapes to game actions with cooldown
  • Left wink -> shoot, right wink -> aim, smile -> jump, angry brow -> special ability
  • Adds GameDemoViewController visual demo with flash feedback per action

How it works

GameInputController.analyze(faceAnchor:) checks blend shape thresholds each AR frame and fires the delegate at most once per cooldown window (default 0.3s) to prevent rapid duplicate events.

Test plan

  • Run on TrueDepth iPhone (XS or later)
  • Each expression triggers correct label + flash color
  • Cooldown prevents double-firing
  • No crash when blend shape values missing

Generated with Claude Code

Maps ARKit blend shapes to game actions with cooldown:
- Left wink  -> shoot
- Right wink -> aim
- Smile      -> jump
- Angry brow -> special ability

GameDemoViewController provides a visual demo screen.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant