chaperone info.vrchap

From Valve Developer Community
Jump to: navigation, search

Format of chaperone info.vrchap (as an annotated example)

chaperone info.vrchap is a json file of the structure below. It controls the user's play space and Chaperone bounds. This file lives in the "config" directory under Steam.

Coordinates are specified in meters, where one of the base stations is usually used as the zero point of the coordinate system of a given universe (though ultimately all coordinates within a universe are relative to each other). Positive values on the Y axis are floorward, while negative values are ceiling/skyward.

Angles are specified in radians.

{
   // An identifier that this is a chaperone info file.
   "jsonid" : "chaperone_info",
   // An array of "universes" for SteamVR to recognize. One way to have SteamVR incorporate
   // multiple separate universes is to associate with different base stations (trackers),
   // and only keep one universe's set of base stations powered on when starting SteamVR.
   "universes" : [
      {
         // Array of polygons (strictly quadrilaterals?), as arrays of three-point [x,y,z] vectors,
         // defining the Chaperone bounds displayed when nearing the edge of the playspace.
         "collision_bounds" : [
            [
               [ 1.2875618934631348, 0, -1.3121980428695679 ],
               [ 1.2875618934631348, 2.4300000667572021, -1.3121980428695679 ],
               [ -1.2928156852722168, 2.4300000667572021, -1.326968789100647 ],
               [ -1.2928156852722168, 0, -1.326968789100647 ]
            ],
            [
               [ -1.2928156852722168, 0, -1.326968789100647 ],
               [ -1.2928156852722168, 2.4300000667572021, -1.326968789100647 ],
               [ -1.31610107421875, 2.4300000667572021, 1.3202917575836182 ],
               [ -1.31610107421875, 0, 1.3202917575836182 ]
            ],
            [
               [ -1.31610107421875, 0, 1.3202917575836182 ],
               [ -1.31610107421875, 2.4300000667572021, 1.3202917575836182 ],
               [ 1.3519337177276611, 2.4300000667572021, 1.3289443254470825 ],
               [ 1.3519337177276611, 0, 1.3289443254470825 ]
            ],
            [
               [ 1.3519337177276611, 0, 1.3289443254470825 ],
               [ 1.3519337177276611, 2.4300000667572021, 1.3289443254470825 ],
               [ 1.2875618934631348, 2.4300000667572021, -1.3121980428695679 ],
               [ 1.2875618934631348, 0, -1.3121980428695679 ]
            ]
         ],
         // The dimensions of the safe play space, as an array of width and length.
         "play_area" : [ 2.4999995231628418, 2.4999995231628418 ],
         // The "seated position" for this universe.
         "seated" : {
            "translation" : [ -0.11369179934263229, 1.4345219135284424, 2.0180449485778809 ],
            "yaw" : 2.0425128936767578
         },
         // The center of the safe play space, and its orientation.
         "standing" : {
            "translation" : [ 1.2371996641159058, 2.1295108795166016, 3.6462483406066895 ],
            "yaw" : 0.7958943247795105
         },
         // The last time (as a local timestamp) that this universe was modified).
         "time" : "Mon May 16 14:51:23 2016",
         // An array of the base stations that serve as Lighthouse trackers for this universe,
         // their positions, and their serial numbers (for matching signals with points in the universe).
         "trackers" : [
            {
               "angOffset" : [ 2.5943741798400879, 0.066968150436878204, 3.1121318340301514 ],
               "posOffset" : [ -1.2149749994277954, 0.12261301279067993, -6.0983948707580566 ],
               "serial" : "LHB-2A82209B"
            },
            {
               "angOffset" : [ -0.53753918409347534, -0.03840361163020134, -0.064321219921112061 ],
               "posOffset" : [ 0, 0, 0 ],
               "serial" : "LHB-1ADC58B0"
            }
         ],
         // The ID for this universe to distinguish it from other universes.
         // By default, this is set as the epoch time that the universe was first initialized
         // (as a string).
         "universeID" : "1462047444"
      }
   ],
   // The version of the chaperone info schema that this structure adheres to.
   "version" : 5
}