mocapV2 runs an HTTP server on port 80. All of the following paths can be accessed with GET requests.
Returns a list of trackers.
An expected response looks something like:
{
"trackers": [
{
"name": "indexhmd",
"alias": "head",
"index": 0
}
]
}
Reloads the list of trackers.
Note that the new list of trackers is not returned, you will have to obtain it from /trackers
.
Fetches the current position of trackers.
cframe
is relative to the Roblox CFrame format, and is simply a 3x4 matrix.
⚠️ If you use this endpoint, please make sure to use it's counterpart,/capture/end
at some point, or memory usage will skyrocket!
Starts motion capture.
All trackers will be recorded at 60 frames per second.
Stops motion capture.
If there has been no motion capture data, expect a response like:
{
"error": "No capture"
}
If motion capture was successful, expect a response like:
{
"count": 1
}
Please note the count
object, which is used to obtain the motion capture data.
Obtains a single block of motion capture data.
This is stored in JSON to make parsing easier.
Each block of motion capture data is the entire JSON string split into ~500 kilobyte chunks.
You are expected to fetch every page (from 1 to the count
object, obtained from /capture/end
) and append them together to form a single JSON string.