gesture-rotate
Rotate on-screen content by simulating a two-finger circular arc gesture. Use for rotating maps, images, or UI elements in iOS simulators and Android emulators.
Instructions
Send a two-finger circular arc gesture to rotate on-screen content by a specified angle. Two fingers are placed opposite each other at a fixed radius from the center, then swept from startAngle to endAngle degrees. All positions and radius are normalized 0.0–1.0 (fractions of screen width/height, not pixels)—same coordinate space as gesture-tap and gesture-swipe. endAngle > startAngle = clockwise rotation. Typical values: radius 0.15, startAngle 0, endAngle 90 for a 90° clockwise turn. Auto-generates interpolated frames at ~60fps. Unlike gesture-pinch which moves fingers linearly to zoom, this orbits fingers in an arc to change orientation. Use when you need to rotate a map, image picker, or any rotateable UI element. Returns { rotated: true, timestampMs }. Fails if the simulator-server / emulator backend is not reachable for the given device.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | Yes | Target device id from `list-devices` (iOS UDID or Android serial). | |
| radius | Yes | Distance from center to each finger: normalized 0.0–1.0 (fraction of screen, not pixels). E.g. 0.15 = fingers placed 15% of screen away from center. | |
| centerX | Yes | Center of rotation, horizontal: normalized 0.0–1.0 (fraction of screen width, not pixels) | |
| centerY | Yes | Center of rotation, vertical: normalized 0.0–1.0 (fraction of screen height, not pixels) | |
| endAngle | Yes | Ending angle in degrees. endAngle > startAngle = clockwise. | |
| durationMs | No | Total gesture duration in milliseconds (default 300) | |
| startAngle | Yes | Starting angle in degrees (0 = right, 90 = down) |