dolphin_set_wiimote_acceleration
Set the Wii Remote's accelerometer values (in g) for one frame, enabling raw motion input in games like Wii Sports bowling swings.
Instructions
PURPOSE: Set the Wii Remote's accelerometer reading on the given port. USAGE: Use for games that read raw accelerometer data — Wii Sports bowling/golf swings, Mario Galaxy's shake-to-spin, anything that doesn't go through the higher-level swing/shake/tilt helpers (deferred to a future release). Units are roughly g (Earth gravity ≈ 1.0); a Remote held still and pointing forward typically reads about (0, 1, 0). For a single-frame impulse, set the value then dolphin_frame_advance(1) then reset to neutral. BEHAVIOR: DESTRUCTIVE to accelerometer state for the addressed port. ClearOn::NextFrame semantics — set persists for one render frame only. RETURNS: 'Set Wii Remote port N accel to (x, y, z)'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| port | No | Wii Remote port (0-3, default 0). | |
| x | Yes | Accel X (roughly g). | |
| y | Yes | Accel Y (roughly g; ~1.0 for level-and-still pointing forward). | |
| z | Yes | Accel Z (roughly g). |
Implementation Reference
- bridge/mcp_bridge.py:115-115 (helper)Python bridge helper function that unpacks the positional params (port, x, y, z) and calls Felk's controller.set_wiimote_acceleration API inside Dolphin.
def _set_wiimote_acceleration(p): controller.set_wiimote_acceleration(p[0], p[1], p[2], p[3]); return None - bridge/mcp_bridge.py:157-157 (registration)Maps the RPC method string 'controller.set_wiimote_acceleration' to the _set_wiimote_acceleration Python function in the HANDLERS dict.
"controller.set_wiimote_acceleration": _set_wiimote_acceleration,