sensor.orientation
Simulate device orientation angles or a named pose so deviceorientation events, compass and VR head-tracking fire on desktop browsers.
Instructions
Set how the device is held, so deviceorientation fires on a desktop: alpha (compass turn), beta (front-back tilt) and gamma (left-right tilt) in degrees, or a named pose (flat-face-up, portrait-upright, landscape-left, landscape-right). Angles given alongside a pose override it. For VR, aim the head instead: yaw/pitch/roll turn the head from the pose (default landscape-left, a phone in a headset), e.g. pitch:-30 to look down at a menu. This is the gyroscope a VR viewer, compass or tilt control reads.
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": "sensor.orientation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| yaw | No | Head turn left (+) / right (-) in degrees, about the vertical. | |
| beta | No | Front-back tilt, -180 to 180. 90 is upright in portrait (use 89: exactly 90 reads as null). | |
| pose | No | flat-face-up, portrait-upright, landscape-left (a phone in a VR headset) or landscape-right. | |
| roll | No | Head roll toward the right ear (+) in degrees. | |
| alpha | No | Rotation about the vertical axis, 0-360. | |
| gamma | No | Left-right tilt, -90 to 90. -90 is upright in landscape with the top to the left. | |
| pitch | No | Head tilt up (+) / down (-) in degrees. | |
| absolute | No | Also drive deviceorientationabsolute / AbsoluteOrientationSensor. | |
| target_id | No | Target handle (tgt_*). Omit for the active page. | |
| browser_id | No | Browser handle (br_*). Omit to use the only running browser, or auto-launch one. |