Set Player Input (AI self-play)
unity_set_player_inputDrive a Unity player tank by setting throttle, steering, and queuing one fire shot per call; physical keyboard input is ignored while remote override is active.
Instructions
Drive the player tank remotely: throttle/steer become the TankController input (physical keyboard ignored while override is on). Fire is edge-triggered — one call queues exactly one shot.
Loop: unity_get_game_state -> decide -> unity_set_player_input (repeat ~2-5x/sec) -> poll result. Call unity_clear_player_input to hand control back to the human.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "unity_set_player_input"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fire | No | Queue one shot (edge-triggered, consumed by next frame) | |
| steer | No | Hull steer: +1 right, -1 left | |
| throttle | No | Hull throttle: +1 full forward, -1 full reverse |