Body Tracking
The Body component allows you to stream the full 3D pose of the human body to the server in real time using the WebXR Body Tracking API.
To use this mixed reality (XR) feature, you must run vuer behind an SSL proxy (WebXR requires HTTPS). We recommend using either:
- ngrok (paid, stable performance) — ngrok documentation
- localtunnel (free, open source) — localtunnel documentation
Body Tracking API
You can access the full body pose by listening to the BODY_TRACKING_MOVE event. The event will send all tracked joint positions and orientations as transformation matrices, indexed by XRBodyJoint.
Here’s what Body Tracking looks like on devices that support it (e.g., Meta Quest3).
Example
Returned Data
The BODY_TRACKING_MOVE event sends a BodiesData object containing all joints and their transform matrices:
Matrix Format
All transforms are 4×4 matrices stored in a 16-element Float32Array, column-major order:
Refer to MDN’s XR Rigid Transform documentation for details.
Body Joints Order
The BODY_JOINT_KEYS list follows the WebXR Body Tracking Joints Specification and includes head, torso, arms, hands, and legs.
Example:
| Joint Name | Example Index |
|---|---|
| hips | 0 |
| spine-lower | 1 |
| head | 6 |
| left-hand-thumb-tip | 23 |
| right-foot-ball | 79 |
Full list: see BODY_JOINT_KEYS in the client code.
Notes
WebXR Specification Differences XRHandJoint (hand joints) and XRBodyJoint (body joints) have different origin points and axis orientations.
- For hand joints, the -Y axis is typically perpendicular to the palm, and the -Z axis runs along the bone toward the fingertip.
- For body joints (e.g.,
hips,spine,shoulder), the -Y axis is perpendicular to the skin surface, and the -Z axis runs along the bone away from the joint. In particular, the local coordinate systems ofwristandhipshave explicit but different definitions in the WebXR specification.