# Wolfenstein 3D Controller

![Wolfenstein 3D controller icon](pwa-512x512.png "Wolfenstein 3D controller icon")

`wolfenstein-c` is the smartphone touch controller for the RCWeb [`wolfenstein`](../wolfenstein/appinfo) viewer. Scan the viewer's QR code or open `/wolfenstein-c/?r=<room>` with the same room as the shared display.

The first connected phone owns the single-player controls. The controller keeps a private identity in local storage so a refresh can reclaim the session, announces its presence every two seconds, and releases held actions whenever the page is hidden, blurred, refreshed, or closed.

Drag the main stick to move and turn, and use the separate Strafe slider for sideways motion. `Fire` and `Use` can be held while moving. `Weapon` cycles collected weapons, `Map` toggles the minimap, `Menu` pauses or resumes, and `Select` continues completion and game-over screens. `Reset game` restarts the paired viewer's local runtime.

Every action is sent with `rc.sendFunctionCall` to the `wolfenstein` app target in the same room. The viewer validates controller ownership and remains authoritative for the game, rendering, audio, and saves; the phone sends input intent only.
