-
Notifications
You must be signed in to change notification settings - Fork 17
WandService
This service takes data coming from a Mocap and a Controller service and merges it into a single Wand type event.
In a VR system, we may want to use a controller (like a Wiimote or PS3 move) as a wand device for pointing and selection. To do this, set of markers is usually attached to the device to perform 3D tracking. This means we have two separate input systems used to implement a wand (the gamepad and the 3D tracker). WandService
joins these two systems into a logical wand, with its own stream of input events. This way, applications don't have to keep track of two separate streams of events to implement wand logic.
- Service type: Wand
-
Event types: Same as source controller events (Usually
Up
,Down
,Update
) - Event data fields: position, orientation, plus anything coming from controller source ( usually flags for digital buttons and extra data (float array) for analog inputs)
The event is the same as what is generated by the controller source (check the guide for the controller service you are using), plus position and orientation data coming from the mocap service.
-
debug (bool)
: enables debug mode -
raySourceId (int)
: the source id for mocap events to use as the wand device -
controllerService (string)
: the name of the service generating the controller events -
controllerSourceId (int)
: the source id of the controller to use as the wand device - (v3.0)
pointer (section)
: an optional configuration section used to generate 2D pointer data for this Wand. See pointer section for more information.
Wand events can optionally contain 2D pointer data, generated using a customizable ray to point mapper. Ray point mappers are useful to generate pointer events from wands for a specific display geometry, to allow hybrid 2D/3D interaction in applications. Pointer data will be stored in the Wand event in two floating point extra data fields. The pointer coordinates are normalized and will need to be converted to pixel coordinated by the application. The pointer section contains the following entries:
-
xAxisId (int)
,yAxisId (int)
- optional: the extra data field that will store the 2D pointer X and Y axes. Default values are 2 for the x axis and 3 for the Y axis, normally overlapping with the right thumb-stick data of a dual analog gamepad. -
type (string)
- the mapper type. Supported are: 'cylindrical'.
-
radius (float)
- The cylinder radius in meters. -
doorWidth (float)
- The width of the door opening, in degrees. -
xBias (float)
- Correction to computed x values, applied to normalized output. -
minY (float)
,maxY (float)
- Minimum and maximum Y position, unusally represented by bottom and top endges of display wrt floor or 0 Y reference of tracking system.