OSC: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
[[File:OSC_Keyart.png|thumb|300x300px]] | [[File:OSC_Keyart.png|thumb|300x300px]] | ||
[https://opensoundcontrol.stanford.edu/index.html '''OSC'''] is a way to get different devices and applications to talk to each other. VRChat announced on February 16th 2022 OSC for avatars<ref>https://hello.vrchat.com/blog/vrchat-osc-for-avatars</ref>. | [https://opensoundcontrol.stanford.edu/index.html '''OSC'''] is a way to get different devices and applications to talk to each other. VRChat announced on February 16th 2022 OSC for avatars<ref>https://hello.vrchat.com/blog/vrchat-osc-for-avatars</ref>. This feature is commonly used by body-, eye- and face trackers to communicate with [[Special:MyLanguage/VRChat|VRChat]], as well as by other applications that automate [[Special:MyLanguage/Avatars|Avatar]] parameters. | ||
==OSCQuery== | ==OSCQuery== | ||
[https://github.com/Vidvox/OSCQueryProposal OSCQuery] is a protocol to connect OSC applications together | [https://github.com/Vidvox/OSCQueryProposal OSCQuery] is a protocol to connect OSC applications together more easily. Information on how to connect with VRChat with OSCQuery is available on the [https://github.com/vrchat-community/osc/wiki/OSCQuery VRChat OSCQuery GitHub Wiki]. VRChat also provides [https://github.com/vrchat-community/vrc-oscquery-lib a C# library on GitHub]. | ||
Some of the community made OSCQuery libraries: | Some of the community made OSCQuery libraries: | ||
| Line 13: | Line 12: | ||
== OSC feature set == | == OSC feature set == | ||
OSC enables control and monitoring of multiple systems within VRChat, including input controls, avatar parameters, chatbox functionality, and camera systems such as the [[Camera Dolly]] | OSC enables control and monitoring of multiple systems within VRChat, including input controls, avatar parameters, chatbox functionality, and camera systems such as the [[Camera Dolly]]. | ||
=== Input | === OSC messages === | ||
OSC can trigger VRChat input actions by sending messages to <code>/input/*</code> addresses. This includes movement controls, view rotation, jumping, voice toggling, and VR-specific interactions. For a | Many of VRChat's OSC endpoints can accept multiple values in one message, and each value must be one of certain types: | ||
{| class="wikitable" | |||
! Name | |||
! Type | |||
! Description | |||
|- | |||
| int | |||
| <code>i</code> | |||
| 32-bit signed integer (big-endian) | |||
|- | |||
| float | |||
| <code>f</code> | |||
| 32-bit IEEE 754 single-precision float (big-endian) | |||
|- | |||
| boolean | |||
| <code>T</code> or <code>,F</code> | |||
| Boolean true or false, respectively | |||
|- | |||
| string | |||
| <code>s</code> | |||
| ASCII text (some endpoints explicitly accept UTF-8 encoded text) | |||
|} | |||
In an OSC message, the string specifying the types of the message's values begins with a <code>,</code> followed by one character for each type<ref>https://opensoundcontrol.stanford.edu/spec-1_0.html#osc-type-tag-string</ref>, and in the following tables, the type of the whole message is listed. | |||
Sometimes, when an OSC message has only one parameter, VRChat may accept an equivalent value of a different type: | |||
{| class="wikitable" | |||
! boolean | |||
! int | |||
! float | |||
|- | |||
| false | |||
| 0 | |||
| 0.0 | |||
|- | |||
| true | |||
| 1 | |||
| 1.0 | |||
|} | |||
For example, if the Avatar parameter <code>/avatar/parameters/TurboEncabulator</code> is a boolean, sending any of <br><code>/avatar/parameters/TurboEncabulator ,T</code>,<br><code>/avatar/parameters/TurboEncabulator ,i 1</code>, or <br><code>/avatar/parameters/TurboEncabulator ,f 1.0</code> as a message will set the parameter to true. | |||
VRChat accepts and processes messages sent inside of [https://opensoundcontrol.stanford.edu/spec-1_0.html#osc-bundles OSC bundles], but does not itself send any bundles. | |||
=== Avatar === | |||
OSC provides read and write access to [https://docs.vrchat.com/docs/osc-avatar-parameters avatar parameters], enabling real-time control of avatar expressions, animations, and custom behaviors. | |||
Parameters are accessed through <code>/avatar/parameters/<ParameterName></code> addresses and support integer, float, and boolean data types. | |||
Custom Avatar parameter names and behaviors are defined by individual avatar creators, but there are a number of [https://creators.vrchat.com/avatars/animator-parameters/#built-in-parameters reserved parameters]. | |||
All Avatar '''custom''' OSC endpoints are read-write, but all Avatar '''reserved''' OSC endpoints are read-only unless otherwise specified. | |||
{| class="wikitable" | |||
! Address | |||
! Type | |||
! Description | |||
|- | |||
| <code>/avatar/change</code> | |||
| <code>,s</code> | |||
| '''read-write''' Current user avatar id | |||
|- | |||
| <code>/avatar/parameters/VRCEmote</code> | |||
| <code>,i</code> | |||
| '''read-write''' Default animation (1 to 16) [[Open_Sound_Control#parameter-common|*]] | |||
|- | |||
| <code>/avatar/parameters/VRCFaceBlendV</code> | |||
| <code>,f</code> | |||
| '''read-write''' [[Open_Sound_Control#parameter-common|*]] | |||
|- | |||
| <code>/avatar/parameters/VRCFaceBlendH</code> | |||
| <code>,f</code> | |||
| '''read-write''' [[Open_Sound_Control#parameter-common|*]] | |||
|- | |||
| <code>/avatar/parameters/PreviewMode</code> | |||
| <code>,i</code> | |||
| 1: Avatar in menu preview, otherwise 0 (OSC: '''always 0''') | |||
|- | |||
| <code>/avatar/parameters/IsOnFriendsList</code> | |||
| <code>,T</code> | |||
| Whether the local user is friends with the remote user with this avatar (OSC: '''always false''') | |||
|- | |||
| <code>/avatar/parameters/IsAnimatorEnabled</code> | |||
| <code>,T</code> | |||
| Whether the animator is enabled | |||
|- | |||
| '''Gesture''' | |||
| | |||
| | |||
|- | |||
| <code>/avatar/parameters/GestureRightWeight</code> | |||
| <code>,f</code> | |||
| Weight for right hand gesture | |||
|- | |||
| <code>/avatar/parameters/GestureLeftWeight</code> | |||
| <code>,f</code> | |||
| Weight for left hand gesture | |||
|- | |||
| <code>/avatar/parameters/GestureRight</code> | |||
| <code>,i</code> | |||
| Right hand gesture<ref>https://creators.vrchat.com/avatars/animator-parameters#gestureleft-and-gestureright-values</ref> | |||
|- | |||
| <code>/avatar/parameters/GestureLeft</code> | |||
| <code>,i</code> | |||
| Left hand gesture | |||
|- | |||
| '''Scaling''' | |||
| | |||
| | |||
|- | |||
| <code>/avatar/parameters/ScaleModified</code> | |||
| <code>,T</code> | |||
| Whether the avatar scale has been changed from the default height | |||
|- | |||
| <code>/avatar/parameters/ScaleFactor</code> | |||
| <code>,f</code> | |||
| Avatar current height / default height | |||
|- | |||
| <code>/avatar/parameters/ScaleFactorInverse</code> | |||
| <code>,f</code> | |||
| Reciprocal of above (default height / current height) | |||
|- | |||
| <code>/avatar/parameters/EyeHeightAsMeters</code> | |||
| <code>,f</code> | |||
| Avatar current eye height in meters | |||
|- | |||
| <code>/avatar/parameters/EyeHeightAsPercent</code> | |||
| <code>,f</code> | |||
| Linear interpolation of avatar current eye height between default limits (e.g., 0.0: 0.2 meters, 0.5: 2.6 meters, 1.0: 5.0 meters) | |||
|- | |||
| '''Sound''' | |||
| | |||
| | |||
|- | |||
| <code>/avatar/parameters/Viseme</code> | |||
| <code>,i</code> | |||
| The [[Visemes|viseme]] currently shown<ref>https://creators.vrchat.com/avatars/animator-parameters#viseme-values</ref> | |||
|- | |||
| <code>/avatar/parameters/Voice</code> | |||
| <code>,f</code> | |||
| Microphone volume (0.0: silent, 1.0: loudest) | |||
|- | |||
| <code>/avatar/parameters/Earmuffs</code> | |||
| <code>,T</code> | |||
| Whether the user has Earmuff Mode enabled | |||
|- | |||
| <code>/avatar/parameters/MuteSelf</code> | |||
| <code>,T</code> | |||
| Whether the user has muted themselves | |||
|- | |||
| '''Player''' | |||
| | |||
| | |||
|- | |||
| <code>/avatar/parameters/AFK</code> | |||
| <code>,T</code> | |||
| Whether the user is AFK | |||
|- | |||
| <code>/avatar/parameters/InStation</code> | |||
| <code>,T</code> | |||
| Whether the user is in a station | |||
|- | |||
| <code>/avatar/parameters/Seated</code> | |||
| <code>,T</code> | |||
| Duplicate of above, '''not''' "seated mode" vs. "standing mode" | |||
|- | |||
| <code>/avatar/parameters/VRMode</code> | |||
| <code>,i</code> | |||
| 1: VR mode, otherwise 0 | |||
|- | |||
| <code>/avatar/parameters/TrackingType</code> | |||
| <code>,i</code> | |||
| Number of currently tracked points<ref>https://creators.vrchat.com/avatars/animator-parameters#trackingtype-parameter</ref> | |||
|- | |||
| '''Positioning''' | |||
| | |||
| | |||
|- | |||
| <code>/avatar/parameters/Grounded</code> | |||
| <code>,T</code> | |||
| Whether the user is touching the floor int the world | |||
|- | |||
| <code>/avatar/parameters/Upright</code> | |||
| <code>,f</code> | |||
| Heuristic for how "upright" you are (0.0: prone, 1.0: standing straight up) | |||
|- | |||
| <code>/avatar/parameters/AngularY</code> | |||
| <code>,f</code> | |||
| Rightward angular velocity | |||
|- | |||
| <code>/avatar/parameters/VelocityX</code> | |||
| <code>,f</code> | |||
| Rightward velocity in m/s | |||
|- | |||
| <code>/avatar/parameters/VelocityY</code> | |||
| <code>,f</code> | |||
| Upward velocity in m/s | |||
|- | |||
| <code>/avatar/parameters/VelocityZ</code> | |||
| <code>,f</code> | |||
| Forward velocity in m/s | |||
|- | |||
| <code>/avatar/parameters/VelocityMagnitude</code> | |||
| <code>,f</code> | |||
| Total magnitude of velocity: √( VelocityX ² + VelocityY ² + VelocityZ ² ) | |||
|} | |||
<span id="parameter-common">'''*'''</span> ''technically not required/built-in, but these parameters are in the default animator and are almost always present'' | |||
=== Input === | |||
OSC can trigger VRChat input actions by sending messages to <code>/input/*</code> addresses. | |||
This includes movement controls, view rotation, jumping, voice toggling, and VR-specific interactions. | |||
All [https://docs.vrchat.com/docs/osc-as-input-controller Input] OSC endpoints are write-only. | |||
==== Axes ==== | |||
These expect a float from -1 to 1 to control things like movement. | |||
They must be reset to 0 when not in use: a <code>/input/Vertical ,f 1</code> message without a corresponding <code>/input/Vertical ,f 0</code> will continue to move you forward forever. | |||
{| class="wikitable" | |||
! Address | |||
! Type | |||
! Description | |||
! +1 | |||
! -1 | |||
|- | |||
| <code>/input/Horizontal</code> | |||
| <code>,f</code> | |||
| Player movement | |||
| right | |||
| left | |||
|- | |||
| <code>/input/Vertical</code> | |||
| <code>,f</code> | |||
| Player movement | |||
| forward | |||
| backward | |||
|- | |||
| <code>/input/LookHorizontal</code> | |||
| <code>,f</code> | |||
| Player rotation [[Open_Sound_Control#input-smooth|*]] | |||
| right | |||
| left | |||
|- | |||
| <code>/input/LookVertical</code> [[Open_Sound_Control#osc-defacto|†]] | |||
| <code>,f</code> | |||
| Player rotation | |||
| up | |||
| down | |||
|- | |||
| <code>/input/SpinHoldCwCcw</code> | |||
| <code>,f</code> | |||
| Held item rotation | |||
| clockwise | |||
| counter-clockwise | |||
|- | |||
| <code>/input/SpinHoldUD</code> | |||
| <code>,f</code> | |||
| Held item rotation | |||
| up | |||
| down | |||
|- | |||
| <code>/input/SpinHoldLR</code> | |||
| <code>,f</code> | |||
| Held item rotation | |||
| left | |||
| right | |||
|- | |||
| <code>/input/MoveHoldFB</code> | |||
| <code>,f</code> | |||
| Held item movement | |||
| forward | |||
| backward | |||
|- | |||
| <code>/input/UseAxisRight</code> [[Open_Sound_Control#osc-limbo|‡]] | |||
| <code>,f</code> | |||
| Held item use | |||
| | |||
| | |||
|- | |||
| <code>/input/GrabAxisRight</code> [[Open_Sound_Control#osc-limbo|‡]] | |||
| <code>,f</code> | |||
| Held item grab | |||
| | |||
| | |||
|} | |||
==== Buttons ==== | |||
These expect an boolean of true for "pressed" and false for "released". | |||
For compatability, they also accept ints of 0 and 1, equivalent to false/"released" and true/"pressed" respectively. | |||
They must be reset to false when not in use: a <code>/input/MoveForward ,T</code> message without a corresponding <code>/input/MoveForward ,F</code> will continue to move you forward forever. | |||
They must also be reset to false before they can be used again: sending a <code>/input/Jump ,T</code> and then another <code>/input/Jump ,T</code> without a <code>/input/Jump ,F</code> between them will only result in a single jump. | |||
{| class="wikitable" | |||
! Address | |||
! Type | |||
! Description | |||
|- | |||
| <code>/input/MoveForward</code> | |||
| <code>,T</code> | |||
| Move forward | |||
|- | |||
| <code>/input/MoveBackward</code> | |||
| <code>,T</code> | |||
| Move backward | |||
|- | |||
| <code>/input/MoveLeft</code> | |||
| <code>,T</code> | |||
| Move left | |||
|- | |||
| <code>/input/MoveRight</code> | |||
| <code>,T</code> | |||
| Move right | |||
|- | |||
| <code>/input/LookLeft</code> | |||
| <code>,T</code> | |||
| Turn left [[Open_Sound_Control#input-smooth|*]] | |||
|- | |||
| <code>/input/LookRight</code> | |||
| <code>,T</code> | |||
| Turn right [[Open_Sound_Control#input-smooth|*]] | |||
|- | |||
| <code>/input/Jump</code> | |||
| <code>,T</code> | |||
| Jump (if supported by the world) | |||
|- | |||
| <code>/input/Run</code> | |||
| <code>,T</code> | |||
| Run (if supported by the world) | |||
|- | |||
| <code>/input/ComfortLeft</code> | |||
| <code>,T</code> | |||
| Snap-Turn to the left (VR only) | |||
|- | |||
| <code>/input/ComfortRight</code> | |||
| <code>,T</code> | |||
| Snap-Turn to the right (VR only) | |||
|- | |||
| <code>/input/GrabRight</code> | |||
| <code>,T</code> | |||
| Grab item highlighted by right hand | |||
|- | |||
| <code>/input/UseRight</code> | |||
| <code>,T</code> | |||
| Use item held in right hand | |||
|- | |||
| <code>/input/DropRight</code> | |||
| <code>,T</code> | |||
| Drop item held in right hand | |||
|- | |||
| <code>/input/GrabLeft</code> | |||
| <code>,T</code> | |||
| Grab item highlighted by left hand | |||
|- | |||
| <code>/input/UseLeft</code> | |||
| <code>,T</code> | |||
| Use item held in left hand | |||
|- | |||
| <code>/input/DropLeft</code> | |||
| <code>,T</code> | |||
| Drop item held in left hand | |||
|- | |||
| <code>/input/PanicButton</code> | |||
| <code>,T</code> | |||
| Enable Safe Mode | |||
|- | |||
| <code>/input/QuickMenuToggleLeft</code> | |||
| <code>,T</code> | |||
| Toggle Quick Menu for left hand | |||
|- | |||
| <code>/input/QuickMenuToggleRight</code> | |||
| <code>,T</code> | |||
| Toggle Quick Menu for right hand | |||
|- | |||
| <code>/input/ToggleSitStand</code> [[Open_Sound_Control#osc-defacto|†]] | |||
| <code>,T</code> | |||
| Toggle between Sitting and Standing | |||
|- | |||
| <code>/input/AFKToggle</code> [[Open_Sound_Control#osc-defacto|†]] | |||
| <code>,T</code> | |||
| Toggle AFK mode | |||
|- | |||
| <code>/input/Voice</code> | |||
| <code>,T</code> | |||
| Toggle Microphone (in Push-To-Talk Mode, false = "muted" and true = "unmuted") | |||
|- | |||
| <code>/input/ShowDebugInfo1</code> | |||
| <code>,T</code> | |||
| Displays information about loaded asset bundles (mostly irrelevant to world development) | |||
|- | |||
| <code>/input/ShowDebugInfo2</code> | |||
| <code>,T</code> | |||
| Displays the current build of VRChat that you are using, along with your FPS | |||
|- | |||
| <code>/input/ShowDebugInfo3</code> | |||
| <code>,T</code> | |||
| Displays your output log | |||
|- | |||
| <code>/input/ShowDebugInfo4</code> | |||
| <code>,T</code> | |||
| Displays various stats about other users | |||
|- | |||
| <code>/input/ShowDebugInfo5</code> | |||
| <code>,T</code> | |||
| Displays some graphs related to networking | |||
|- | |||
| <code>/input/ShowDebugInfo6</code> | |||
| <code>,T</code> | |||
| Displays all the networked objects in your world, along with various stats [[Open_Sound_Control#input-dbgauthor|⁑]] | |||
|- | |||
| <code>/input/ShowDebugInfo7</code> | |||
| <code>,T</code> | |||
| Overlays visual representations of every PhysBone and Contact in the world near the local player [[Open_Sound_Control#input-dbgauthor|⁑]] | |||
|- | |||
| <code>/input/ShowDebugInfo8</code> | |||
| <code>,T</code> | |||
| Overlays a panel on top of every synced object in the world; ach panel displays various stats about that specific object [[Open_Sound_Control#input-dbgauthor|⁑]] | |||
|- | |||
| <code>/input/ShowDebugInfo9</code> | |||
| <code>,T</code> | |||
| Displays debug stats for every player in the instance at their feet [[Open_Sound_Control#input-dbgauthor|⁑]] | |||
|} | |||
The <code>/input/ShowDebugInfo[1-9]</code> endpoints are for [https://creators.vrchat.com/worlds/udon/world-debug-views/ World Debug Views] | |||
<span id="input-smooth">'''*'''</span> ''smooth-turn in Desktop; will snap-turn in VR when value 1 or true if Comfort Turning is on'' | |||
<span id="input-dbgauthor">'''⁑'''</span> ''only accessible to the world creator unless they have turned on "World Debugging" via the website'' | |||
==== Chatbox ==== | |||
{| class="wikitable" | |||
! Address | |||
! Type | |||
! Description | |||
|- | |||
| <code>/chatbox/input</code> | |||
| <code>,sTT</code> | |||
| Set Chatbox content | |||
|- | |||
| | |||
| 1st parameter <code>s</code> | |||
| Text to input/send (144 character, 9 line maximum; supports UTF-8 text) | |||
|- | |||
| | |||
| 2nd parameter <code>T</code> | |||
| Whether to send immediately, otherwise open the keyboard and populate the text | |||
|- | |||
| | |||
| 3rd parameter <code>T</code> | |||
| Whether to trigger the notification SFX (optional, defaults to true; only applicable if text is sent immediately) | |||
|- | |||
| <code>/chatbox/typing</code> | |||
| <code>,T</code> | |||
| Set Chatbox typing indicator visibility (the <code>...</code>) | |||
|} | |||
=== Tracking === | |||
All [https://docs.vrchat.com/docs/osc-trackers Tracking] and [https://docs.vrchat.com/docs/osc-eye-tracking Eye Tracking] OSC endpoints are write-only unless otherwise specified. | |||
Sending the <code>/tracking/trackers/head/...</code> values is optional; if supplied, VRChat will use them as the frame of reference for the other OSC trackers. | |||
After 10 seconds without receiving data, eye tracking behavior will revert to default (auto look / auto blink). This timeout is separate for eyelids and eye-look. | |||
{| class="wikitable" | |||
! Address | |||
! Type | |||
! Description | |||
|- | |||
| <code>/tracking/trackers/[1-8]/position</code> | |||
| <code>,fff</code> | |||
| The position of the tracker | |||
|- | |||
| | |||
| 1st parameter <code>f</code> | |||
| Cartesian X coordinate | |||
|- | |||
| | |||
| 2nd parameter <code>f</code> | |||
| Cartesian Y coordinate | |||
|- | |||
| | |||
| 3rd parameter <code>f</code> | |||
| Cartesian Z coordinate | |||
|- | |||
| <code>/tracking/trackers/[1-8]/rotation</code> | |||
| <code>,fff</code> | |||
| The rotation of the tracker | |||
|- | |||
| | |||
| 1st parameter <code>f</code> | |||
| Euler X angle | |||
|- | |||
| | |||
| 2nd parameter <code>f</code> | |||
| Euler Y angle | |||
|- | |||
| | |||
| 3rd parameter <code>f</code> | |||
| Euler Z angle | |||
|- | |||
| <code>/tracking/trackers/[1-8]/position</code> | |||
| <code>,fff</code> | |||
| The position of the headset (see <code>.../position</code> above) | |||
|- | |||
| <code>/tracking/trackers/[1-8]/rotation</code> | |||
| <code>,fff</code> | |||
| The rotation of the headset (see <code>.../rotation</code> above) | |||
|- | |||
| <code>/tracking/eye/EyesClosedAmount</code> | |||
| <code>,f</code> | |||
| How closed the eyes are (0.0: fully open, 1.0: fully closed) | |||
|- | |||
| <code>/tracking/eye/CenterPitchYaw</code> | |||
| <code>,ff</code> | |||
| Pitch and yaw for automatic raycast (eyes look at hit location) | |||
|- | |||
| | |||
| 1st parameter <code>f</code> | |||
| Euler X angle | |||
|- | |||
| | |||
| 2nd parameter <code>f</code> | |||
| Euler Y angle | |||
|- | |||
| <code>/tracking/eye/CenterPitchYaw</code> | |||
| <code>,ff</code> | |||
| Pitch, yaw, and distance for raycast (eyes look at vector position) | |||
|- | |||
| | |||
| 1st parameter <code>f</code> | |||
| Euler X angle | |||
|- | |||
| | |||
| 2nd parameter <code>f</code> | |||
| Euler Y angle | |||
|- | |||
| | |||
| 3rd parameter <code>f</code> | |||
| Raycast distance | |||
|- | |||
| <code>/tracking/eye/CenterVec</code> | |||
| <code>,fff</code> | |||
| Headset-local '''normalized''' vector for automatic raycast (eyes look at hit location) | |||
|- | |||
| | |||
| 1st parameter <code>f</code> | |||
| Cartesian X coordinate | |||
|- | |||
| | |||
| 2nd parameter <code>f</code> | |||
| Cartesian Y coordinate | |||
|- | |||
| | |||
| 3rd parameter <code>f</code> | |||
| Cartesian Z coordinate | |||
|- | |||
| <code>/tracking/eye/CenterVecFull</code> | |||
| <code>,fff</code> | |||
| Headset-local vector for raycast (eyes look at vector position) | |||
|- | |||
| | |||
| 1st parameter <code>f</code> | |||
| Cartesian X coordinate | |||
|- | |||
| | |||
| 2nd parameter <code>f</code> | |||
| Cartesian Y coordinate | |||
|- | |||
| | |||
| 3rd parameter <code>f</code> | |||
| Cartesian Z coordinate | |||
|- | |||
| <code>/tracking/eye/LeftRightPitchYaw</code> | |||
| <code>,ffff</code> | |||
| Pitch and yaw for each eye individually | |||
|- | |||
| | |||
| 1st parameter <code>f</code> | |||
| Euler X angle for left eye | |||
|- | |||
| | |||
| 2nd parameter <code>f</code> | |||
| Euler Y angle for left eye | |||
|- | |||
| | |||
| 3rd parameter <code>f</code> | |||
| Euler X angle for right eye | |||
|- | |||
| | |||
| 4th parameter <code>f</code> | |||
| Euler Y angle right eye | |||
|- | |||
| <code>/tracking/eye/LeftRightVec</code> | |||
| <code>,fff</code> | |||
| Headset-local '''normalized''' vectors for each eye individually | |||
|- | |||
| | |||
| 1st parameter <code>f</code> | |||
| Cartesian X coordinate for left eye | |||
|- | |||
| | |||
| 2nd parameter <code>f</code> | |||
| Cartesian Y coordinate for left eye | |||
|- | |||
| | |||
| 3rd parameter <code>f</code> | |||
| Cartesian Z coordinate for left eye | |||
|- | |||
| | |||
| 4th parameter <code>f</code> | |||
| Cartesian X coordinate for right eye | |||
|- | |||
| | |||
| 5th parameter <code>f</code> | |||
| Cartesian Y coordinate for right eye | |||
|- | |||
| | |||
| 6th parameter <code>f</code> | |||
| Cartesian Z coordinate for right eye | |||
|- | |||
| <code>/tracking/vrsystem/head/pose</code> [[Open_Sound_Control#osc-defacto|†]] | |||
| <code>,ffffff</code> | |||
| The '''read-only''' system pose for the headset | |||
|- | |||
| | |||
| 1st parameter <code>f</code> | |||
| Cartesian X coordinate | |||
|- | |||
| | |||
| 2nd parameter <code>f</code> | |||
| Cartesian Y coordinate | |||
|- | |||
| | |||
| 3rd parameter <code>f</code> | |||
| Cartesian Z coordinate | |||
| | |||
| 4th parameter <code>f</code> | |||
| Euler X angle | |||
|- | |||
| | |||
| 5th parameter <code>f</code> | |||
| Euler Y angle | |||
|- | |||
| | |||
| 6th parameter <code>f</code> | |||
| Euler Z angle | |||
|- | |||
| <code>/tracking/vrsystem/leftwrist/pose</code> [[Open_Sound_Control#osc-defacto|†]] | |||
| <code>,ffffff</code> | |||
| The '''read-only''' system pose for the left wrist (see <code>>.../head/pose</code> above) | |||
|- | |||
| <code>/tracking/vrsystem/rightwrist/pose</code> [[Open_Sound_Control#osc-defacto|†]] | |||
| <code>,ffffff</code> | |||
| The '''read-only''' system pose for the right wrist (see <code>>.../head/pose</code> above) | |||
|} | |||
==== Coordinates ==== | |||
The coordinate system used is generally the same as the left-handed Unity coordinate system. | |||
For Cartesian coordinate vectors, distances are in meters of real-world space. | |||
* +X is right, -X is left | |||
* +Y is up, -Y is down | |||
* +Z is forward, -Z is backward | |||
For Euler angle vectors, angles are in degrees and are applied in (ZXY) order internally when converting to a quaternion. | |||
* +X is pitch down, -X is pitch up | |||
* +Y is yaw right, -Y is yaw left | |||
* +Z is roll left/counter-clockwise, -Z is roll right/clockwise | |||
=== | === User Camera === | ||
OSC | All [https://docs.vrchat.com/docs/vrchat-202533#osc-camera-endpoints User Camera] OSC endpoints are read-write unless otherwise specified. | ||
{| class="wikitable" | |||
! Address | |||
! Type | |||
! Description | |||
! | |||
|- | |||
| <code>/usercamera/Mode</code> | |||
| <code>,i</code> | |||
| Camera mode | |||
| 0: Off<br> 1: Photo<br> 2: Stream<br> 3: Emoji<br> 4: Multilayer<br> 5: Print<br> 6: Drone | |||
|- | |||
| <code>/usercamera/Pose</code> | |||
| <code>,ffffff</code> | |||
| Camera position & rotation | |||
| '''read-only''' see <code>/tracking/vrsystem/head/pos</code> above | |||
|} | |||
==== Actions ==== | |||
{| class="wikitable" | |||
! Address | |||
! Type | |||
! Description | |||
! | |||
|- | |||
| <code>/usercamera/Close</code> | |||
| <code>,T</code> | |||
| Close camera <br> Equivalent to <code>/usercamera/Mode ,i 0</code> | |||
| '''write-only''' see [[Open_Sound_Control#Buttons|buttons]] | |||
|- | |||
| <code>/usercamera/Capture</code> | |||
| <code>,T</code> | |||
| Take a photo | |||
| '''write-only''' see [[Open_Sound_Control#Buttons|buttons]] | |||
|- | |||
| <code>/usercamera/CaptureDelayed</code> | |||
| <code>,T</code> | |||
| Take a timed photo | |||
| '''write-only''' see [[Open_Sound_Control#Buttons|buttons]] | |||
|} | |||
==== Toggles ==== | |||
{| class="wikitable" | |||
! Address | |||
! Type | |||
! Description | |||
|- | |||
| <code>/usercamera/ShowUIInCamera</code> | |||
| <code>,T</code> | |||
| UI mask | |||
|- | |||
| <code>/usercamera/LocalPlayer</code> | |||
| <code>,T</code> | |||
| Local Player mask | |||
|- | |||
| <code>/usercamera/RemotePlayer</code> | |||
| <code>,T</code> | |||
| Remote Players mask | |||
|- | |||
| <code>/usercamera/Environment</code> | |||
| <code>,T</code> | |||
| Environment mask | |||
|- | |||
| <code>/usercamera/GreenScreen</code> | |||
| <code>,T</code> | |||
| Greenscreen | |||
|- | |||
| <code>/usercamera/Lock</code> | |||
| <code>,T</code> | |||
| Camera lock | |||
|- | |||
| <code>/usercamera/SmoothMovement</code> | |||
| <code>,T</code> | |||
| Smoothed behavior | |||
|- | |||
| <code>/usercamera/LookAtMe</code> | |||
| <code>,T</code> | |||
| Look-At-Me behaviour | |||
|- | |||
| <code>/usercamera/AutoLevelRoll</code> | |||
| <code>,T</code> | |||
| Auto-level roll behavior | |||
|- | |||
| <code>/usercamera/AutoLevelPitch</code> | |||
| <code>,T</code> | |||
| Auto-level pitch behavior | |||
|- | |||
| <code>/usercamera/Flying</code> | |||
| <code>,T</code> | |||
| Flying | |||
|- | |||
| <code>/usercamera/TriggerTakesPhotos</code> | |||
| <code>,T</code> | |||
| Trigger takes photos | |||
|- | |||
| <code>/usercamera/DollyPathsStayVisible</code> | |||
| <code>,T</code> | |||
| Dolly path visiblity while animating | |||
|- | |||
| <code>/usercamera/AudioFromCamera</code> | |||
| <code>,T</code> | |||
| Audio from camera | |||
|- | |||
| <code>/usercamera/ShowFocus</code> | |||
| <code>,T</code> | |||
| Focus overlay | |||
|- | |||
| <code>/usercamera/Streaming</code> | |||
| <code>,T</code> | |||
| Spout stream | |||
|- | |||
| <code>/usercamera/RollWhileFlying</code> | |||
| <code>,T</code> | |||
| Roll while flying behavior | |||
|- | |||
| <code>/usercamera/OrientationIsLandscape</code> | |||
| <code>,T</code> | |||
| Image orientation | |||
|} | |||
==== Sliders ==== | |||
{| class="wikitable" | |||
! Address | |||
! Type | |||
! Description | |||
! Default | |||
! Minimum | |||
! Maximum | |||
|- | |||
| <code>/usercamera/Zoom</code> | |||
| <code>,f</code> | |||
| Zoom | |||
| 45 | |||
| 20 | |||
| 150 | |||
|- | |||
| <code>/usercamera/Exposure</code> | |||
| <code>,f</code> | |||
| Exposure | |||
| 0 | |||
| -10 | |||
| 4 | |||
|- | |||
| <code>/usercamera/FocalDistance</code> | |||
| <code>,f</code> | |||
| Focal distance | |||
| 1.5 | |||
| 0 | |||
| 10 | |||
|- | |||
| <code>/usercamera/Aperture</code> | |||
| <code>,f</code> | |||
| Aperture | |||
| 15 | |||
| 1.4 | |||
| 32 | |||
|- | |||
| <code>/usercamera/Hue</code> | |||
| <code>,f</code> | |||
| Greenscreen hue | |||
| 120 | |||
| 0 | |||
| 360 | |||
|- | |||
| <code>/usercamera/Saturation</code> | |||
| <code>,f</code> | |||
| Greenscreen saturation | |||
| 100 | |||
| 0 | |||
| 100 | |||
|- | |||
| <code>/usercamera/Lightness</code> | |||
| <code>,f</code> | |||
| Greenscreen lightness | |||
| 60 | |||
| 0 | |||
| 50 | |||
|- | |||
| <code>/usercamera/LookAtMeXOffset</code> | |||
| <code>,f</code> | |||
| 0 | |||
| -25 | |||
| 25 | |||
|- | |||
| <code>/usercamera/LookAtMeYOffset</code> | |||
| <code>,f</code> | |||
| Look-At-Me Y offset | |||
| 0 | |||
| -25 | |||
| 25 | |||
|- | |||
| <code>/usercamera/FlySpeed</code> | |||
| <code>,f</code> | |||
| Fly speed | |||
| 3 | |||
| 0.1 | |||
| 15 | |||
|- | |||
| <code>/usercamera/TurnSpeed</code> | |||
| <code>,f</code> | |||
| Turn speed | |||
| 1 | |||
| 0.1 | |||
| 5 | |||
|- | |||
| <code>/usercamera/SmoothingStrength</code> | |||
| <code>,f</code> | |||
| Smoothing strength | |||
| 5 | |||
| 0.1 | |||
| 10 | |||
|- | |||
| <code>/usercamera/PhotoRate</code> | |||
| <code>,f</code> | |||
| Dolly photo capture rate | |||
| 1 | |||
| 0.1 | |||
| 2 | |||
|- | |||
| <code>/usercamera/Duration</code> | |||
| <code>,f</code> | |||
| Dolly duration | |||
| 2 | |||
| 0.1 | |||
| 60 | |||
|} | |||
=== Dolly === | |||
All [[Camera Dolly#OSC integration|Dolly]] OSC endpoints are write-only unless otherwise specified. | |||
{| class="wikitable" | |||
! Address | |||
! Type | |||
! Description | |||
! | |||
|- | |||
| <code>/dolly/Import</code> | |||
| <code>,s</code> | |||
| Import dolly path from a JSON file | |||
| | |||
|- | |||
| <code>/dolly/Export</code> | |||
| <code>,s</code> | |||
| Export current dolly path to a JSON file<br>Emits an OSC message when export is complete | |||
| | |||
|- | |||
| <code>/dolly/ExportLocal</code> | |||
| <code>,s</code> | |||
| As above, but exports all points as local | |||
| | |||
|- | |||
| <code>/dolly/PlayDelayed</code> | |||
| <code>,f</code> | |||
| Play an animation after a delay (in seconds) | |||
| | |||
|- | |||
| <code>/dolly/Play</code> | |||
| <code>,T</code> | |||
| Play or stop an animation<br>Skip delay or cancel a delayed animation<br>Emits an OSC message when animation state changes | |||
| '''read-write''' | |||
|} | |||
<big>Errata</big> | |||
<span id="osc-defacto">'''†'''</span> ''Missing from the VRChat Docs page, but present in the client OSCQuery response'' | |||
<span id="osc-limbo">'''‡'''</span> ''Present on the VRChat Docs page, but missing from the client OSCQuery response'' | |||
== OSC ports == | == OSC ports == | ||
VRChat uses two UDP ports for OSC communication on localhost (<code>127.0.0.1</code>): | VRChat uses [https://docs.vrchat.com/docs/osc-overview#vrchat-ports two UDP ports] for OSC communication and one TCP port for OSCQuery on localhost (<code>127.0.0.1</code>): | ||
{| class="wikitable" | {| class="wikitable" | ||
! Port | ! Port | ||
| Line 31: | Line 938: | ||
! Purpose | ! Purpose | ||
|- | |- | ||
| '''9000''' | | UDP '''9000''' | ||
| Send → VRChat | | Send → VRChat | ||
| Your application sends messages to VRChat | | Your application sends messages to VRChat | ||
|- | |- | ||
| '''9001''' | | UDP '''9001''' | ||
| Receive ← VRChat | | Receive ← VRChat | ||
| Your application receives messages from VRChat | | Your application receives messages from VRChat | ||
|- | |||
| TCP '''variable''' | |||
| HTTP ↔ VRChat | |||
| Your application gets OSCQuery data from VRChat | |||
|} | |} | ||
You can manually find the port numbers for these features by searching the current log file for a line that looks like <br><code>2025.01.02 03:04:05 Debug - Advertising Service VRChat-Client-A1B2C3 of type OSCQuery on 42069</code> or <br><code>2025.01.02 03:04:05 Debug - Advertising Service VRChat-Client-A1B2C3 of type OSC on 9000</code> | |||
== Resources == | == Resources == | ||
| Line 44: | Line 956: | ||
* [https://docs.vrchat.com/docs/osc-overview OSC Overview] on the VRChat Documentation | * [https://docs.vrchat.com/docs/osc-overview OSC Overview] on the VRChat Documentation | ||
* [https://github.com/Vidvox/OSCQueryProposal Full OSCQuery proposal] and how it functions while including example code | * [https://github.com/Vidvox/OSCQueryProposal Full OSCQuery proposal] and how it functions while including example code | ||
* [https://tools.glowbuzzer.com/rotationconverter Euler angles visualizer] (the coordinate system is not exactly like Unity, so negate the '''Euler X angle''' and set the order to '''ZXY''') | |||
==References== | ==References== | ||
{{reflist}} | {{reflist}} | ||
[[Category:Features]] | [[Category:Features]] | ||
Revision as of 07:30, 3 December 2025

OSC is a way to get different devices and applications to talk to each other. VRChat announced on February 16th 2022 OSC for avatars[1]. This feature is commonly used by body-, eye- and face trackers to communicate with VRChat, as well as by other applications that automate Avatar parameters.
OSCQuery
OSCQuery is a protocol to connect OSC applications together more easily. Information on how to connect with VRChat with OSCQuery is available on the VRChat OSCQuery GitHub Wiki. VRChat also provides a C# library on GitHub.
Some of the community made OSCQuery libraries:
- TypeScript with example scripts on GitHub by Jangxx - node-oscquery.
- Python with examples on the GitHub readme.md - vrchat_oscquery. An older variant that's more descriptive - tinyoscquery.
- Rust implementation with baseline functionality - oscquery.
OSC feature set
OSC enables control and monitoring of multiple systems within VRChat, including input controls, avatar parameters, chatbox functionality, and camera systems such as the Camera Dolly.
OSC messages
Many of VRChat's OSC endpoints can accept multiple values in one message, and each value must be one of certain types:
| Name | Type | Description |
|---|---|---|
| int | i
|
32-bit signed integer (big-endian) |
| float | f
|
32-bit IEEE 754 single-precision float (big-endian) |
| boolean | T or ,F
|
Boolean true or false, respectively |
| string | s
|
ASCII text (some endpoints explicitly accept UTF-8 encoded text) |
In an OSC message, the string specifying the types of the message's values begins with a , followed by one character for each type[2], and in the following tables, the type of the whole message is listed.
Sometimes, when an OSC message has only one parameter, VRChat may accept an equivalent value of a different type:
| boolean | int | float |
|---|---|---|
| false | 0 | 0.0 |
| true | 1 | 1.0 |
For example, if the Avatar parameter /avatar/parameters/TurboEncabulator is a boolean, sending any of /avatar/parameters/TurboEncabulator ,T,/avatar/parameters/TurboEncabulator ,i 1, or /avatar/parameters/TurboEncabulator ,f 1.0 as a message will set the parameter to true.
VRChat accepts and processes messages sent inside of OSC bundles, but does not itself send any bundles.
Avatar
OSC provides read and write access to avatar parameters, enabling real-time control of avatar expressions, animations, and custom behaviors.
Parameters are accessed through /avatar/parameters/<ParameterName> addresses and support integer, float, and boolean data types.
Custom Avatar parameter names and behaviors are defined by individual avatar creators, but there are a number of reserved parameters.
All Avatar custom OSC endpoints are read-write, but all Avatar reserved OSC endpoints are read-only unless otherwise specified.
| Address | Type | Description |
|---|---|---|
/avatar/change
|
,s
|
read-write Current user avatar id |
/avatar/parameters/VRCEmote
|
,i
|
read-write Default animation (1 to 16) * |
/avatar/parameters/VRCFaceBlendV
|
,f
|
read-write * |
/avatar/parameters/VRCFaceBlendH
|
,f
|
read-write * |
/avatar/parameters/PreviewMode
|
,i
|
1: Avatar in menu preview, otherwise 0 (OSC: always 0) |
/avatar/parameters/IsOnFriendsList
|
,T
|
Whether the local user is friends with the remote user with this avatar (OSC: always false) |
/avatar/parameters/IsAnimatorEnabled
|
,T
|
Whether the animator is enabled |
| Gesture | ||
/avatar/parameters/GestureRightWeight
|
,f
|
Weight for right hand gesture |
/avatar/parameters/GestureLeftWeight
|
,f
|
Weight for left hand gesture |
/avatar/parameters/GestureRight
|
,i
|
Right hand gesture[3] |
/avatar/parameters/GestureLeft
|
,i
|
Left hand gesture |
| Scaling | ||
/avatar/parameters/ScaleModified
|
,T
|
Whether the avatar scale has been changed from the default height |
/avatar/parameters/ScaleFactor
|
,f
|
Avatar current height / default height |
/avatar/parameters/ScaleFactorInverse
|
,f
|
Reciprocal of above (default height / current height) |
/avatar/parameters/EyeHeightAsMeters
|
,f
|
Avatar current eye height in meters |
/avatar/parameters/EyeHeightAsPercent
|
,f
|
Linear interpolation of avatar current eye height between default limits (e.g., 0.0: 0.2 meters, 0.5: 2.6 meters, 1.0: 5.0 meters) |
| Sound | ||
/avatar/parameters/Viseme
|
,i
|
The viseme currently shown[4] |
/avatar/parameters/Voice
|
,f
|
Microphone volume (0.0: silent, 1.0: loudest) |
/avatar/parameters/Earmuffs
|
,T
|
Whether the user has Earmuff Mode enabled |
/avatar/parameters/MuteSelf
|
,T
|
Whether the user has muted themselves |
| Player | ||
/avatar/parameters/AFK
|
,T
|
Whether the user is AFK |
/avatar/parameters/InStation
|
,T
|
Whether the user is in a station |
/avatar/parameters/Seated
|
,T
|
Duplicate of above, not "seated mode" vs. "standing mode" |
/avatar/parameters/VRMode
|
,i
|
1: VR mode, otherwise 0 |
/avatar/parameters/TrackingType
|
,i
|
Number of currently tracked points[5] |
| Positioning | ||
/avatar/parameters/Grounded
|
,T
|
Whether the user is touching the floor int the world |
/avatar/parameters/Upright
|
,f
|
Heuristic for how "upright" you are (0.0: prone, 1.0: standing straight up) |
/avatar/parameters/AngularY
|
,f
|
Rightward angular velocity |
/avatar/parameters/VelocityX
|
,f
|
Rightward velocity in m/s |
/avatar/parameters/VelocityY
|
,f
|
Upward velocity in m/s |
/avatar/parameters/VelocityZ
|
,f
|
Forward velocity in m/s |
/avatar/parameters/VelocityMagnitude
|
,f
|
Total magnitude of velocity: √( VelocityX ² + VelocityY ² + VelocityZ ² ) |
* technically not required/built-in, but these parameters are in the default animator and are almost always present
Input
OSC can trigger VRChat input actions by sending messages to /input/* addresses.
This includes movement controls, view rotation, jumping, voice toggling, and VR-specific interactions.
All Input OSC endpoints are write-only.
Axes
These expect a float from -1 to 1 to control things like movement.
They must be reset to 0 when not in use: a /input/Vertical ,f 1 message without a corresponding /input/Vertical ,f 0 will continue to move you forward forever.
| Address | Type | Description | +1 | -1 |
|---|---|---|---|---|
/input/Horizontal
|
,f
|
Player movement | right | left |
/input/Vertical
|
,f
|
Player movement | forward | backward |
/input/LookHorizontal
|
,f
|
Player rotation * | right | left |
/input/LookVertical †
|
,f
|
Player rotation | up | down |
/input/SpinHoldCwCcw
|
,f
|
Held item rotation | clockwise | counter-clockwise |
/input/SpinHoldUD
|
,f
|
Held item rotation | up | down |
/input/SpinHoldLR
|
,f
|
Held item rotation | left | right |
/input/MoveHoldFB
|
,f
|
Held item movement | forward | backward |
/input/UseAxisRight ‡
|
,f
|
Held item use | ||
/input/GrabAxisRight ‡
|
,f
|
Held item grab |
Buttons
These expect an boolean of true for "pressed" and false for "released".
For compatability, they also accept ints of 0 and 1, equivalent to false/"released" and true/"pressed" respectively.
They must be reset to false when not in use: a /input/MoveForward ,T message without a corresponding /input/MoveForward ,F will continue to move you forward forever.
They must also be reset to false before they can be used again: sending a /input/Jump ,T and then another /input/Jump ,T without a /input/Jump ,F between them will only result in a single jump.
| Address | Type | Description |
|---|---|---|
/input/MoveForward
|
,T
|
Move forward |
/input/MoveBackward
|
,T
|
Move backward |
/input/MoveLeft
|
,T
|
Move left |
/input/MoveRight
|
,T
|
Move right |
/input/LookLeft
|
,T
|
Turn left * |
/input/LookRight
|
,T
|
Turn right * |
/input/Jump
|
,T
|
Jump (if supported by the world) |
/input/Run
|
,T
|
Run (if supported by the world) |
/input/ComfortLeft
|
,T
|
Snap-Turn to the left (VR only) |
/input/ComfortRight
|
,T
|
Snap-Turn to the right (VR only) |
/input/GrabRight
|
,T
|
Grab item highlighted by right hand |
/input/UseRight
|
,T
|
Use item held in right hand |
/input/DropRight
|
,T
|
Drop item held in right hand |
/input/GrabLeft
|
,T
|
Grab item highlighted by left hand |
/input/UseLeft
|
,T
|
Use item held in left hand |
/input/DropLeft
|
,T
|
Drop item held in left hand |
/input/PanicButton
|
,T
|
Enable Safe Mode |
/input/QuickMenuToggleLeft
|
,T
|
Toggle Quick Menu for left hand |
/input/QuickMenuToggleRight
|
,T
|
Toggle Quick Menu for right hand |
/input/ToggleSitStand †
|
,T
|
Toggle between Sitting and Standing |
/input/AFKToggle †
|
,T
|
Toggle AFK mode |
/input/Voice
|
,T
|
Toggle Microphone (in Push-To-Talk Mode, false = "muted" and true = "unmuted") |
/input/ShowDebugInfo1
|
,T
|
Displays information about loaded asset bundles (mostly irrelevant to world development) |
/input/ShowDebugInfo2
|
,T
|
Displays the current build of VRChat that you are using, along with your FPS |
/input/ShowDebugInfo3
|
,T
|
Displays your output log |
/input/ShowDebugInfo4
|
,T
|
Displays various stats about other users |
/input/ShowDebugInfo5
|
,T
|
Displays some graphs related to networking |
/input/ShowDebugInfo6
|
,T
|
Displays all the networked objects in your world, along with various stats ⁑ |
/input/ShowDebugInfo7
|
,T
|
Overlays visual representations of every PhysBone and Contact in the world near the local player ⁑ |
/input/ShowDebugInfo8
|
,T
|
Overlays a panel on top of every synced object in the world; ach panel displays various stats about that specific object ⁑ |
/input/ShowDebugInfo9
|
,T
|
Displays debug stats for every player in the instance at their feet ⁑ |
The /input/ShowDebugInfo[1-9] endpoints are for World Debug Views
* smooth-turn in Desktop; will snap-turn in VR when value 1 or true if Comfort Turning is on
only accessible to the world creator unless they have turned on "World Debugging" via the website
Chatbox
| Address | Type | Description |
|---|---|---|
/chatbox/input
|
,sTT
|
Set Chatbox content |
1st parameter s
|
Text to input/send (144 character, 9 line maximum; supports UTF-8 text) | |
2nd parameter T
|
Whether to send immediately, otherwise open the keyboard and populate the text | |
3rd parameter T
|
Whether to trigger the notification SFX (optional, defaults to true; only applicable if text is sent immediately) | |
/chatbox/typing
|
,T
|
Set Chatbox typing indicator visibility (the ...)
|
Tracking
All Tracking and Eye Tracking OSC endpoints are write-only unless otherwise specified.
Sending the /tracking/trackers/head/... values is optional; if supplied, VRChat will use them as the frame of reference for the other OSC trackers.
After 10 seconds without receiving data, eye tracking behavior will revert to default (auto look / auto blink). This timeout is separate for eyelids and eye-look.
| Address | Type | Description | |||
|---|---|---|---|---|---|
/tracking/trackers/[1-8]/position
|
,fff
|
The position of the tracker | |||
1st parameter f
|
Cartesian X coordinate | ||||
2nd parameter f
|
Cartesian Y coordinate | ||||
3rd parameter f
|
Cartesian Z coordinate | ||||
/tracking/trackers/[1-8]/rotation
|
,fff
|
The rotation of the tracker | |||
1st parameter f
|
Euler X angle | ||||
2nd parameter f
|
Euler Y angle | ||||
3rd parameter f
|
Euler Z angle | ||||
/tracking/trackers/[1-8]/position
|
,fff
|
The position of the headset (see .../position above)
| |||
/tracking/trackers/[1-8]/rotation
|
,fff
|
The rotation of the headset (see .../rotation above)
| |||
/tracking/eye/EyesClosedAmount
|
,f
|
How closed the eyes are (0.0: fully open, 1.0: fully closed) | |||
/tracking/eye/CenterPitchYaw
|
,ff
|
Pitch and yaw for automatic raycast (eyes look at hit location) | |||
1st parameter f
|
Euler X angle | ||||
2nd parameter f
|
Euler Y angle | ||||
/tracking/eye/CenterPitchYaw
|
,ff
|
Pitch, yaw, and distance for raycast (eyes look at vector position) | |||
1st parameter f
|
Euler X angle | ||||
2nd parameter f
|
Euler Y angle | ||||
3rd parameter f
|
Raycast distance | ||||
/tracking/eye/CenterVec
|
,fff
|
Headset-local normalized vector for automatic raycast (eyes look at hit location) | |||
1st parameter f
|
Cartesian X coordinate | ||||
2nd parameter f
|
Cartesian Y coordinate | ||||
3rd parameter f
|
Cartesian Z coordinate | ||||
/tracking/eye/CenterVecFull
|
,fff
|
Headset-local vector for raycast (eyes look at vector position) | |||
1st parameter f
|
Cartesian X coordinate | ||||
2nd parameter f
|
Cartesian Y coordinate | ||||
3rd parameter f
|
Cartesian Z coordinate | ||||
/tracking/eye/LeftRightPitchYaw
|
,ffff
|
Pitch and yaw for each eye individually | |||
1st parameter f
|
Euler X angle for left eye | ||||
2nd parameter f
|
Euler Y angle for left eye | ||||
3rd parameter f
|
Euler X angle for right eye | ||||
4th parameter f
|
Euler Y angle right eye | ||||
/tracking/eye/LeftRightVec
|
,fff
|
Headset-local normalized vectors for each eye individually | |||
1st parameter f
|
Cartesian X coordinate for left eye | ||||
2nd parameter f
|
Cartesian Y coordinate for left eye | ||||
3rd parameter f
|
Cartesian Z coordinate for left eye | ||||
4th parameter f
|
Cartesian X coordinate for right eye | ||||
5th parameter f
|
Cartesian Y coordinate for right eye | ||||
6th parameter f
|
Cartesian Z coordinate for right eye | ||||
/tracking/vrsystem/head/pose †
|
,ffffff
|
The read-only system pose for the headset | |||
1st parameter f
|
Cartesian X coordinate | ||||
2nd parameter f
|
Cartesian Y coordinate | ||||
3rd parameter f
|
Cartesian Z coordinate | 4th parameter f
|
Euler X angle | ||
5th parameter f
|
Euler Y angle | ||||
6th parameter f
|
Euler Z angle | ||||
/tracking/vrsystem/leftwrist/pose †
|
,ffffff
|
The read-only system pose for the left wrist (see >.../head/pose above)
| |||
/tracking/vrsystem/rightwrist/pose †
|
,ffffff
|
The read-only system pose for the right wrist (see >.../head/pose above)
|
Coordinates
The coordinate system used is generally the same as the left-handed Unity coordinate system.
For Cartesian coordinate vectors, distances are in meters of real-world space.
- +X is right, -X is left
- +Y is up, -Y is down
- +Z is forward, -Z is backward
For Euler angle vectors, angles are in degrees and are applied in (ZXY) order internally when converting to a quaternion.
- +X is pitch down, -X is pitch up
- +Y is yaw right, -Y is yaw left
- +Z is roll left/counter-clockwise, -Z is roll right/clockwise
User Camera
All User Camera OSC endpoints are read-write unless otherwise specified.
| Address | Type | Description | |
|---|---|---|---|
/usercamera/Mode
|
,i
|
Camera mode | 0: Off 1: Photo 2: Stream 3: Emoji 4: Multilayer 5: Print 6: Drone |
/usercamera/Pose
|
,ffffff
|
Camera position & rotation | read-only see /tracking/vrsystem/head/pos above
|
Actions
| Address | Type | Description | |
|---|---|---|---|
/usercamera/Close
|
,T
|
Close camera Equivalent to /usercamera/Mode ,i 0
|
write-only see buttons |
/usercamera/Capture
|
,T
|
Take a photo | write-only see buttons |
/usercamera/CaptureDelayed
|
,T
|
Take a timed photo | write-only see buttons |
Toggles
| Address | Type | Description |
|---|---|---|
/usercamera/ShowUIInCamera
|
,T
|
UI mask |
/usercamera/LocalPlayer
|
,T
|
Local Player mask |
/usercamera/RemotePlayer
|
,T
|
Remote Players mask |
/usercamera/Environment
|
,T
|
Environment mask |
/usercamera/GreenScreen
|
,T
|
Greenscreen |
/usercamera/Lock
|
,T
|
Camera lock |
/usercamera/SmoothMovement
|
,T
|
Smoothed behavior |
/usercamera/LookAtMe
|
,T
|
Look-At-Me behaviour |
/usercamera/AutoLevelRoll
|
,T
|
Auto-level roll behavior |
/usercamera/AutoLevelPitch
|
,T
|
Auto-level pitch behavior |
/usercamera/Flying
|
,T
|
Flying |
/usercamera/TriggerTakesPhotos
|
,T
|
Trigger takes photos |
/usercamera/DollyPathsStayVisible
|
,T
|
Dolly path visiblity while animating |
/usercamera/AudioFromCamera
|
,T
|
Audio from camera |
/usercamera/ShowFocus
|
,T
|
Focus overlay |
/usercamera/Streaming
|
,T
|
Spout stream |
/usercamera/RollWhileFlying
|
,T
|
Roll while flying behavior |
/usercamera/OrientationIsLandscape
|
,T
|
Image orientation |
Sliders
| Address | Type | Description | Default | Minimum | Maximum |
|---|---|---|---|---|---|
/usercamera/Zoom
|
,f
|
Zoom | 45 | 20 | 150 |
/usercamera/Exposure
|
,f
|
Exposure | 0 | -10 | 4 |
/usercamera/FocalDistance
|
,f
|
Focal distance | 1.5 | 0 | 10 |
/usercamera/Aperture
|
,f
|
Aperture | 15 | 1.4 | 32 |
/usercamera/Hue
|
,f
|
Greenscreen hue | 120 | 0 | 360 |
/usercamera/Saturation
|
,f
|
Greenscreen saturation | 100 | 0 | 100 |
/usercamera/Lightness
|
,f
|
Greenscreen lightness | 60 | 0 | 50 |
/usercamera/LookAtMeXOffset
|
,f
|
0 | -25 | 25 | |
/usercamera/LookAtMeYOffset
|
,f
|
Look-At-Me Y offset | 0 | -25 | 25 |
/usercamera/FlySpeed
|
,f
|
Fly speed | 3 | 0.1 | 15 |
/usercamera/TurnSpeed
|
,f
|
Turn speed | 1 | 0.1 | 5 |
/usercamera/SmoothingStrength
|
,f
|
Smoothing strength | 5 | 0.1 | 10 |
/usercamera/PhotoRate
|
,f
|
Dolly photo capture rate | 1 | 0.1 | 2 |
/usercamera/Duration
|
,f
|
Dolly duration | 2 | 0.1 | 60 |
Dolly
All Dolly OSC endpoints are write-only unless otherwise specified.
| Address | Type | Description | |
|---|---|---|---|
/dolly/Import
|
,s
|
Import dolly path from a JSON file | |
/dolly/Export
|
,s
|
Export current dolly path to a JSON file Emits an OSC message when export is complete |
|
/dolly/ExportLocal
|
,s
|
As above, but exports all points as local | |
/dolly/PlayDelayed
|
,f
|
Play an animation after a delay (in seconds) | |
/dolly/Play
|
,T
|
Play or stop an animation Skip delay or cancel a delayed animation Emits an OSC message when animation state changes |
read-write |
Errata
† Missing from the VRChat Docs page, but present in the client OSCQuery response
‡ Present on the VRChat Docs page, but missing from the client OSCQuery response
OSC ports
VRChat uses two UDP ports for OSC communication and one TCP port for OSCQuery on localhost (127.0.0.1):
| Port | Direction | Purpose |
|---|---|---|
| UDP 9000 | Send → VRChat | Your application sends messages to VRChat |
| UDP 9001 | Receive ← VRChat | Your application receives messages from VRChat |
| TCP variable | HTTP ↔ VRChat | Your application gets OSCQuery data from VRChat |
You can manually find the port numbers for these features by searching the current log file for a line that looks like 2025.01.02 03:04:05 Debug - Advertising Service VRChat-Client-A1B2C3 of type OSCQuery on 42069 or 2025.01.02 03:04:05 Debug - Advertising Service VRChat-Client-A1B2C3 of type OSC on 9000
Resources
- OSC Overview on the VRChat Documentation
- Full OSCQuery proposal and how it functions while including example code
- Euler angles visualizer (the coordinate system is not exactly like Unity, so negate the Euler X angle and set the order to ZXY)
References
- ↑ https://hello.vrchat.com/blog/vrchat-osc-for-avatars
- ↑ https://opensoundcontrol.stanford.edu/spec-1_0.html#osc-type-tag-string
- ↑ https://creators.vrchat.com/avatars/animator-parameters#gestureleft-and-gestureright-values
- ↑ https://creators.vrchat.com/avatars/animator-parameters#viseme-values
- ↑ https://creators.vrchat.com/avatars/animator-parameters#trackingtype-parameter